From 65c23d9e9fcf0c7dcaf9b5ad419cbc37d46bdd18 Mon Sep 17 00:00:00 2001 From: Kolloom Date: Tue, 11 Jun 2019 00:49:31 -0500 Subject: [PATCH] Fix docker install instruction Env Var used in the compose.yml is INPUT_DIR and OUTPUT_DIR Clarify the meaning of both variables and output message. Note on -p not working. --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 15769200..ceca5593 100644 --- a/README.md +++ b/README.md @@ -74,19 +74,24 @@ python3 -m manim example_scenes.py SquareToCircle -pl ### Using Docker Since it's a bit tricky to get all the dependencies set up just right, there is a Dockerfile and Compose file provided in this repo as well as [a premade image on Docker Hub](https://hub.docker.com/r/eulertour/manim/tags/). The Dockerfile contains instructions on how to build a manim image, while the Compose file contains instructions on how to run the image. -In order to do this with the Compose file, you must set the `INPUT_PATH` -environment variable to the directory containing your source code and the -`OUTPUT_DIRECTORY` environment variable to the directory where you want media -to be written. +In order to do this with the Compose file, you must set the `INPUT_DIR` +environment variable to the directory containing manim repository and the +`OUTPUT_DIR` environment variable to the directory where you want media to be written. 1. [Install Docker](https://docs.docker.com) 2. [Install Docker Compose](https://docs.docker.com/compose/install/) 3. Render an animation ```sh -INPUT_PATH=/path/to/dir/containing/source/code \ -OUTPUT_PATH=/path/to/dir/for/media \ +INPUT_DIR=/path/to/dir/containing/source/code \ +OUTPUT_DIR=/path/to/output/ \ docker-compose run manim example_scenes.py SquareToCircle -l ``` +The command needs to be run as root if your username is not in the docker group. + +After running the output will say files ready at `tmp/output/`, which is inside the container. Your OUTPUT_DIR is bind mounted to this `/tmp/output` so any changes made by the container to `/tmp/output` will be mirrored on your OUTPUT_DIR. `/media/` will be created in `OUTPUT_DIR`. + +`-p` won't work as manim would look for video player in the container system, which it does not have. + The first time you execute the above command, Docker will pull the image from Docker Hub and cache it. Any subsequent runs until the image is evicted will use the cached image. Note that the image doesn't have any development tools installed and can't preview animations. Its purpose is building and testing only.