Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/Dockerfile.jupyter
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM manimcommunity/manim:latest

RUN pip install jupyterlab

EXPOSE 8888
CMD [ "jupyter", "lab", "--allow-root", "--ip=0.0.0.0" ]
9 changes: 9 additions & 0 deletions docker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ 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 `manimcommunity/manim:jupyterlab` image, which spins up a local webserver running
JupyterLab in whose Python kernel manim is installed and can be accessed via the `%%manim` cell magic. To use this container,
run
```
$ docker run -it -p 8888:88888 manimcommunity/manim:jupyterlab
```
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.

Expand Down
15 changes: 8 additions & 7 deletions manim/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/usr/bin/env python

try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata

__version__ = importlib_metadata.version(__name__)


# Importing the config module should be the first thing we do, since other
# modules depend on the global config dict for initialization.
from ._config import *
Expand Down Expand Up @@ -100,10 +108,3 @@
ipy.register_magics(ManimMagic)

from .plugins import *

try:
import importlib.metadata as importlib_metadata
except ModuleNotFoundError:
import importlib_metadata

__version__ = importlib_metadata.version(__name__)