-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
103 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM python:3 | ||
|
||
# Install numpy using system package manager | ||
RUN apt-get -y update && apt-get -y install libav-tools imagemagick libopencv-dev python-opencv | ||
|
||
# Install some special fonts we use in testing, etc.. | ||
RUN apt-get -y install fonts-liberation | ||
|
||
RUN apt-get install -y locales && \ | ||
locale-gen C.UTF-8 && \ | ||
/usr/sbin/update-locale LANG=C.UTF-8 | ||
|
||
ENV LC_ALL C.UTF-8 | ||
|
||
# do we need all of these, maybe remove some of them? | ||
RUN pip install imageio numpy scipy matplotlib pandas sympy nose decorator tqdm pillow pytest | ||
|
||
# install scikit-image after the other deps, it doesn't cause errors this way. | ||
RUN pip install scikit-image sklearn | ||
|
||
ADD . /var/src/moviepy/ | ||
#RUN git clone https://github.com/Zulko/moviepy.git /var/src/moviepy | ||
RUN cd /var/src/moviepy/ && python setup.py install | ||
|
||
# install ffmpeg from imageio. | ||
RUN python -c "import imageio; imageio.plugins.ffmpeg.download()" | ||
|
||
#add soft link so that ffmpeg can executed (like usual) from command line | ||
RUN ln -s /root/.imageio/ffmpeg/ffmpeg.linux64 /usr/bin/ffmpeg | ||
|
||
# modify ImageMagick policy file so that Textclips work correctly. | ||
RUN cat /etc/ImageMagick-6/policy.xml | sed 's/none/read,write/g'> /etc/ImageMagick-6/policy.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Moviepy Docker | ||
=============== | ||
|
||
Prequisites | ||
------------- | ||
|
||
1. Docker installed `Docker for Mac, Docker for windows, linux, etc <https://www.docker.com/get-docker/>`_ | ||
2. Build the Dockerfile :: | ||
docker build -t moviepy -f Dockerfile . | ||
|
||
|
||
Steps to run the git repo unittests from docker | ||
------------------------------------------------ | ||
|
||
Get a bash prompt in the moviepy container :: | ||
|
||
cd tests | ||
docker run -it -v `pwd`:/tests moviepy bash | ||
|
||
Run the tests :: | ||
cd tests | ||
python test_issues.py | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ User Guide | |
getting_started/getting_started | ||
gallery | ||
examples/examples | ||
docker | ||
FAQ | ||
ref/ref | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters