This Docker-based workflow generates Manim animations based on text descriptions using the Groq API.
- Docker and Docker Compose installed on your system
- Groq API key
-
Copy the
.env.examplefile to.env.local:cp .env.example .env.local
-
Edit the
.env.localfile and add your Groq API key:GROQ_API_KEY=your_actual_groq_api_keyNote:
.env.localis gitignored to ensure your API key remains private.
-
Build and run the container:
docker-compose up --build
-
The script will prompt you for what you want to animate
-
It will generate the animation code using Groq
-
The animation will be rendered using Manim
-
The final video will be saved in the
media/videosdirectory
The generated videos will be available in the media/videos directory on your host machine, thanks to the volume mounting in the Docker configuration.
You can modify the following files to customize the behavior:
main.py: The main script that handles the workflowDockerfile: The container configurationdocker-compose.yml: The service configuration
If you encounter any issues:
- Make sure your Groq API key is correctly set in the
.env.localfile - Check that Docker has sufficient resources allocated
- Ensure all required ports are available
- Check the Docker logs for any error messages # treehacksdockerdeploy