* fix import: move setting __version__ to top of __init__ * add simple Dockerfile for a manim-jupyterlab container * add section on jupyterlab in docker/readme.md * improve Dockerfile: separate user, install manim with all extras, upgrade to python 3.8 * remove separate jupyterlab docker image, adapt readme * add missing latex package * include link to interactive worksheet in documentation * Update README.md Co-authored-by: kolibril13 <44469195+kolibril13@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| Dockerfile | ||
| readme.md | ||
| texlive-profile.txt | ||
Quick reference
- Maintained by: the Manim Community developers
- Getting help: Manim Documentation and further helpful resources
Supported tags
v0.1.1,stable,latest-- the latest released versionv0.1.0experimental-- the most recent version corresponding to the master branch
What is Manim?
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.
