From c2c592679e76d5e5663bed1ce650702648b192f1 Mon Sep 17 00:00:00 2001 From: Scott Opell Date: Thu, 18 Aug 2016 16:20:29 -0400 Subject: [PATCH] adds support for docker --- Dockerfile | 22 ++++++++++++++++++++++ README.md | 10 ++++++++++ requirements.txt | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..89e8bf5a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM python:2.7.12 +RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list +RUN apt-get update && apt-get install -y \ + git + +RUN apt-get -t jessie-backports install -y "ffmpeg" + + +RUN cd /tmp \ + && git clone https://github.com/jakul/aggdraw.git \ + && cd aggdraw \ + && /usr/local/bin/python setup.py install + + +COPY requirements.txt /tmp +RUN pip install --no-cache-dir --requirement /tmp/requirements.txt + +RUN mkdir /app +COPY . /app +WORKDIR /app + +ENTRYPOINT ["python", "extract_scene.py"] diff --git a/README.md b/README.md index 5c3eb07f..70456372 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,13 @@ Try running the following: python extract_scene.py -p example_scenes.py SquareToCircle -p gives a preview of an animation, -w will write it to a file, and -s will show/save the final image in the animation. + +## Docker Method +Since its a bit tricky to get all the dependencies set up just right, there is +a Dockerfile provided. + +1. [Install Docker](https://www.docker.com/products/overview) +2. Build docker image. `docker build -t manim .` +3. Run it! `docker run --rm -v "$PWD/files":/app/files manim example_scenes.py WarpSquare` + +You'll find the output images in `./files` as usual. diff --git a/requirements.txt b/requirements.txt index d744d496..23a149cb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ colour==0.1.2 numpy==1.11.0 -Pillow==1.7.8 +Pillow==3.2.0 progressbar==2.3 scipy==0.17.1 tqdm==4.7.1