manim/docker
2020-12-02 07:04:32 -05:00
..
Dockerfile Docker: use local files when building an image (#803) 2020-12-02 09:56:10 +01:00
readme.md move playground/readme --> docker/readme (#813) 2020-12-02 07:04:32 -05:00
texlive-profile.txt Bring back support for docker (#681) 2020-11-10 21:55:41 +01:00

Quick reference

Supported tags

  • v0.1.0, latest -- the latest released version
  • stable -- a more recent version corresponding to the stable branch
  • experimental -- the most recent version corresponding to the master branch

What is Manim?

logo

Manim is a Python library for creating mathematical animations originally created by Grant "3Blue1Brown" Sanderson. The images in this repository correspond to the community-maintained version of Manim.

To get an impression what Manim can be used for, have a look at our Example Gallery.

How to use this image

Quick Example

To render a scene CircleToSquare in a file test_scenes.py contained in your current working directory while preserving your user and group ID, use

$ docker run --rm -it  --user="$(id -u):$(id -g)" -v "$(pwd)":/manim manimcommunity/manim manim test_scenes.py CircleToSquare -qm

Running the image in the background

Instead of using the "throwaway container" approach sketched above, you can also create a named container that you can also modify to your liking. First, run

$ docker run -it --name my-manim-container -v "$(pwd):/manim" manimcommunity/manim /bin/bash

to obtain an interactive shell inside your container allowing you to, e.g., install further dependencies (like texlive packages using tlmgr). Exit the container as soon as you are satisfied. Then, before using it, start the container by running

$ docker start my-manim-container

Then, to render a scene CircleToSquare in a file test_scenes.py, call

$ docker exec -it --user="$(id -u):$(id -g)" my-manim-container manim test.py CircleToSquare -qm

Important notes

When executing manim within a Docker container, several command line flags (in particular -p (preview file) and -f (show output file in the file browser)) are not supported.

Building the image

The docker image corresponding to the checked out version of the git repository can be built by running

docker build -t manimcommunity/manim:TAG -f docker/Dockerfile .

from the root directory of the repository.