1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
MoviePy Docker
===============
Prerequisites
-------------
Docker installed: `Docker Engine for Linux <https://docs.docker.com/engine/install/>`_ or `Docker Desktop for Windows/Mac/Linux <https://docs.docker.com/desktop/>`_.
Build the docker
-----------------
1. Move into the moviepy root dir
2. Build the Dockerfile ::
docker build -t moviepy -f Dockerfile .
How to run the unittests from docker
------------------------------------------------
Run pytest inside the container with the following command ::
docker run -w /moviepy -it moviepy python -m pytest
Running your own moviepy script from docker
--------------------------------------------
Change directory to where your script is located
If moviepy docker container is already running, you can connect by: ::
docker exec -it moviepy python myscript.py
If the container isn't running already ::
docker run -it moviepy bash
python myscript.py
You can also start a container and run a script in one command: ::
docker run -it -v `pwd`:/code moviepy python myscript.py
|