manim/docker
Naveen M K 7db6c7f730
docs: update installation docs for linux - pango (#1060)
* Linux users should install Pango also

see https://github.com/ManimCommunity/ManimPango/issues/27
manylinux wheels are to be removed in next release on ManimPango

* Add changes to Docker also

* don't mix tabs and spaces
2021-02-28 10:03:03 +01:00
..
Dockerfile docs: update installation docs for linux - pango (#1060) 2021-02-28 10:03:03 +01:00
readme.md Enhancement (of new feature): JupyterLab docker image and documentation for manim and IPython (#977) 2021-01-31 18:24:21 +01:00
texlive-profile.txt Bring back support for docker (#681) 2020-11-10 21:55:41 +01:00

Quick reference

Supported tags

  • v0.1.1, stable, latest -- the latest released version
  • v0.1.0
  • 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

Jupyterlab

Another alternative is to use the docker image to spin up a local webserver running JupyterLab in whose Python kernel manim is installed and can be accessed via the %%manim cell magic. To use JupyterLab, run

$ docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=0.0.0.0

and then follow the instructions in the terminal.

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.