A community-maintained Python framework for creating mathematical animations.
update dockerfile, add flag for high quality rendering (#573)
Devin Nealed24541de692
diff --git a/Dockerfile b/Dockerfileindex 98dfc40e7..8c80567a1 100644--- a/Dockerfile+++ b/Dockerfile@@ -3,12 +3,12 @@ RUN apt-get update \&& apt-get install -qqy --no-install-recommends \apt-utils \ffmpeg \- texlive-latex-base \texlive-full \- texlive-fonts-extra \sox \libcairo2-dev \&& rm -rf /var/lib/apt/lists/*-COPY requirements.txt requirements.txt-RUN python -m pip install -r requirements.txt && rm requirements.txt+COPY . /manim+RUN cd /manim \+ && python setup.py sdist \+ && python -m pip install dist/manimlib*ENTRYPOINT ["/bin/bash"]diff --git a/docker-compose.yml b/docker-compose.ymlindex a39615ad8..a6b3bab4e 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -6,13 +6,13 @@ services:image: eulertour/manim:latest# uncomment this line to build rather than pull the image# build: .- volumes:- - ${MANIM_PATH:?MANIM_PATH environment variable isn't set}:/opt/manim- environment:- - PYTHONPATH=/opt/manim- working_dir: /opt/manimentrypoint:- - python- - -m- manim+ volumes:+ - ${INPUT_DIR:?INPUT_DIR environment variable isn't set}:/tmp/input+ - ${OUTPUT_DIR:?OUTPUT_DIR environment variable isn't set}:/tmp/output+ environment:+ - FILE_DIR=/tmp/output+ - MEDIA_DIR=/tmp/output+ working_dir: /tmp/inputnetwork_mode: "none"diff --git a/manimlib/config.py b/manimlib/config.pyindex c80740bed..eb1240459 100644--- a/manimlib/config.py+++ b/manimlib/config.py@@ -47,6 +47,11 @@ def parse_cli():action="store_true",help="Render at a medium quality",),+ parser.add_argument(+ "--high_quality",+ action="store_true",+ help="Render at a high quality",+ ),parser.add_argument("-g", "--save_pngs",action="store_true",@@ -216,6 +221,8 @@ def get_camera_configuration(args):camera_config.update(manimlib.constants.LOW_QUALITY_CAMERA_CONFIG)elif args.medium_quality:camera_config.update(manimlib.constants.MEDIUM_QUALITY_CAMERA_CONFIG)+ elif args.high_quality:+ camera_config.update(manimlib.constants.HIGH_QUALITY_CAMERA_CONFIG)else:camera_config.update(manimlib.constants.PRODUCTION_QUALITY_CAMERA_CONFIG)diff --git a/manimlib/constants.py b/manimlib/constants.pyindex 9be21e2a8..3fb72a3f5 100644--- a/manimlib/constants.py+++ b/manimlib/constants.py@@ -90,7 +90,7 @@ PRODUCTION_QUALITY_CAMERA_CONFIG = {HIGH_QUALITY_CAMERA_CONFIG = {"pixel_height": 1080,"pixel_width": 1920,- "frame_rate": 30,+ "frame_rate": 60,}MEDIUM_QUALITY_CAMERA_CONFIG = {