diff --git a/README.md b/README.md
index 3e6ad96e85..b98179475c 100644
--- a/README.md
+++ b/README.md
@@ -3,13 +3,14 @@
+
+
-
@@ -34,7 +35,12 @@ Manim is an animation engine for explanatory math videos. It's used to create pr
## Installation
-Manim requires a few dependencies that must be installed prior to using it. Please visit the [Documentation](https://docs.manim.community/en/latest/installation.html) and follow the appropriate instructions for your operating system.
+Manim requires a few dependencies that must be installed prior to using it. If you
+want to try it out first before installing it locally, you can do so
+[in our online Jupyter environment](https://mybinder.org/v2/gist/behackl/725d956ec80969226b7bf9b4aef40b78/HEAD?filepath=basic%20example%20scenes.ipynb).
+
+For the local installation, please visit the [Documentation](https://docs.manim.community/en/latest/installation.html)
+and follow the appropriate instructions for your operating system.
Once the dependencies have been installed, run the following in a terminal window:
@@ -73,7 +79,8 @@ You should see your native video player program pop up and play a simple scene i
[GitHub repository](master/example_scenes). You can also visit the [official gallery](https://docs.manim.community/en/latest/examples.html) for more advanced examples.
Manim also ships with a `%%manim` IPython magic which allows to use it conveniently in JupyterLab (as well as classic Jupyter) notebooks. See the
-[corresponding documentation](https://docs.manim.community/en/latest/reference/manim.utils.ipython_magic.ManimMagic.html) for some guidance.
+[corresponding documentation](https://docs.manim.community/en/latest/reference/manim.utils.ipython_magic.ManimMagic.html) for some guidance and
+[try it out online](https://mybinder.org/v2/gist/behackl/725d956ec80969226b7bf9b4aef40b78/HEAD?filepath=basic%20example%20scenes.ipynb).
## Command line arguments
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 0d9d81c1fb..2c38a54174 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.7-slim
+FROM python:3.8-slim
RUN apt-get update -qq \
&& apt-get install --no-install-recommends -y \
@@ -17,17 +17,33 @@ RUN wget -O /tmp/install-tl-unx.tar.gz http://mirror.ctan.org/systems/texlive/tl
tar -xzf /tmp/install-tl-unx.tar.gz -C /tmp/install-tl --strip-components=1 && \
/tmp/install-tl/install-tl --profile=/tmp/texlive-profile.txt \
&& tlmgr install \
- amsmath babel-english cm-super doublestroke dvisvgm fundus-calligra \
+ amsmath babel-english cm-super doublestroke dvisvgm everysel fundus-calligra \
jknapltx latex-bin microtype ms physics preview ragged2e relsize rsfs \
setspace standalone tipa wasy wasysym xcolor xkeyval
# clone and build manim
COPY . /opt/manim
WORKDIR /opt/manim
-RUN pip install --no-cache .
+RUN pip install --no-cache .[jupyterlab,webgl_renderer]
+# required due to current incompatibility from latest jedi version
+RUN pip install jedi==0.17.2
+
+ARG NB_USER=manimuser
+ARG NB_UID=1000
+ENV USER ${NB_USER}
+ENV NB_UID ${NB_UID}
+ENV HOME /manim
+
+RUN adduser --disabled-password \
+ --gecos "Default user" \
+ --uid ${NB_UID} \
+ ${NB_USER}
# create working directory for user to mount local directory into
-WORKDIR /manim
-RUN chmod 666 /manim
+WORKDIR ${HOME}
+USER root
+RUN chown -R ${NB_USER}:${NB_USER} ${HOME}
+RUN chmod 777 ${HOME}
+USER ${NB_USER}
CMD [ "/bin/bash" ]
diff --git a/docker/readme.md b/docker/readme.md
index 68f8d182f9..4931a630bb 100644
--- a/docker/readme.md
+++ b/docker/readme.md
@@ -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 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.
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
index aa43200bb6..762d670627 100644
--- a/docs/source/examples.rst
+++ b/docs/source/examples.rst
@@ -16,6 +16,10 @@ Enjoy this taste of Manim!
the modules :mod:`~.tex_mobject`, :mod:`~.geometry`, :mod:`~.moving_camera_scene`,
and many more.
+ Check out our `interactive Jupyter environment `_
+ which allows running the examples online, without requiring a local
+ installation.
+
Also, visit our `Twitter `_ for more
*manimations*!
diff --git a/manim/__init__.py b/manim/__init__.py
index f9badcf480..02dca98d00 100644
--- a/manim/__init__.py
+++ b/manim/__init__.py
@@ -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 *
@@ -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__)