A community-maintained Python framework for creating mathematical animations.
Bring back support for docker (#681)
Benjamin Hackl7a7e9cbd57e3
diff --git a/README.md b/README.mdindex fabb03a93..14f71f0fa 100644--- a/README.md+++ b/README.md@@ -1,12 +1,13 @@<p align="center">- <img src="https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped.png" />+ <a href="https://www.manim.community/"><img src="https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped.png"></a><br /><br />- <img src="https://img.shields.io/badge/license-MIT-red.svg?style=flat" alt="MIT License" src="http://choosealicense.com/licenses/mit/" />- <img src="https://img.shields.io/reddit/subreddit-subscribers/manim.svg?color=orange&label=reddit" alt="Reddit" href="https://www.reddit.com/r/manim/" />- <img src="https://img.shields.io/discord/581738731934056449.svg?label=discord&color=yellow" alt="Discord" href="https://discord.gg/mMRrZQW" />- <img src="https://readthedocs.org/projects/manimce/badge/?version=latest" alt="Documentation Status" href="https://manimce.readthedocs.io/en/latest/?badge=latest" />- <img src="https://github.com/ManimCommunity/manim/workflows/CI/badge.svg" alt="CI" />+ <a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-red.svg?style=flat" alt="MIT License"></a>+ <a href="https://www.reddit.com/r/manim/"><img src="https://img.shields.io/reddit/subreddit-subscribers/manim.svg?color=orange&label=reddit" alt="Reddit" href=></a>+ <a href="https://discord.gg/mMRrZQW"><img src="https://img.shields.io/discord/581738731934056449.svg?label=discord&color=yellow" alt="Discord"></a>+ <a href="https://manimce.readthedocs.io/en/latest/"><img src="https://readthedocs.org/projects/manimce/badge/?version=latest" alt="Documentation Status"></a>+ <a href="https://hub.docker.com/r/manimcommunity/manim"><img src="https://img.shields.io/docker/v/manimcommunity/manim?color=%23099cec&label=docker%20image" alt="Docker image"> </a>+ <img src="https://github.com/ManimCommunity/manim/workflows/CI/badge.svg" alt="CI"><br /><br /><i>An animation engine for explanatory math videos</i>@@ -70,7 +71,7 @@ You should see your native video player program pop up and play a simple scene iThe general usage of manim is as follows:-+The `-p` flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The `-ql` flag is for a faster rendering at a lower quality.diff --git a/docker/Dockerfile b/docker/Dockerfilenew file mode 100644index 000000000..a9909abf8--- /dev/null+++ b/docker/Dockerfile@@ -0,0 +1,40 @@+FROM python:3.7-slim++RUN apt-get update -q \+ && apt-get install --no-install-recommends -y \+ ffmpeg \+ gcc \+ git \+ libcairo2-dev \+ libffi-dev \+ pkg-config \+ wget++# setup a minimal texlive installation+COPY ./texlive-profile.txt /tmp/+ENV PATH=/usr/local/texlive/bin/x86_64-linux:$PATH+RUN wget -O /tmp/install-tl-unx.tar.gz http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \+ mkdir /tmp/install-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 \+ jknapltx latex-bin microtype ms physics preview ragged2e relsize rsfs \+ setspace standalone tipa wasy wasysym xcolor xkeyval++# clone and build manim+RUN git clone --depth 1 --branch v0.1.0 https://github.com/ManimCommunity/manim.git /opt/manim+WORKDIR /opt/manim+RUN pip install --no-cache .++# ensure ffi bindings are generated correctly+WORKDIR /usr/local/lib/python3.7/site-packages+RUN python cairocffi/ffi_build.py \+ && python pangocffi/ffi_build.py \+ && python pangocairocffi/ffi_build.py++# create working directory for user to mount local directory into+WORKDIR /manim+RUN chmod 666 /manim++CMD [ "/bin/bash" ]diff --git a/docker/texlive-profile.txt b/docker/texlive-profile.txtnew file mode 100644index 000000000..722c0dc4a--- /dev/null+++ b/docker/texlive-profile.txt@@ -0,0 +1,10 @@+selected_scheme scheme-minimal+TEXDIR /usr/local/texlive+TEXMFCONFIG ~/.texlive/texmf-config+TEXMFHOME ~/texmf+TEXMFLOCAL /usr/local/texlive/texmf-local+TEXMFSYSCONFIG /usr/local/texlive/texmf-config+TEXMFSYSVAR /usr/local/texlive/texmf-var+TEXMFVAR ~/.texlive/texmf-var+option_doc 0+option_src 0\ No newline at end of filediff --git a/docs/source/installation.rst b/docs/source/installation.rstindex 1c9812d7f..4df82ef67 100644--- a/docs/source/installation.rst+++ b/docs/source/installation.rst@@ -32,6 +32,9 @@ can install it from PyPI via pip:You can replace ``pip`` with ``pip3`` is you need to in your system.+Alternatively, you can work with Manim using our Docker image that can be+found at `Docker Hub <https://hub.docker.com/r/manimcommunity/manim>`_.+If you'd like to contribute to and/or help develop ``manim-community``, you canclone this repository to your local device. To do this, first make sure youhave ``git`` installed. Then, clone this repo by executing either