Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile #522

Merged
34 commits merged into from Apr 4, 2017
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b035660
add scipy for py2.7 on travis-ci
bearney74 Mar 14, 2017
1426eb2
Merge branch 'master' of github.com:Zulko/moviepy
bearney74 Mar 14, 2017
26ab7dc
add tests for ffmeg_parse_infos
bearney74 Mar 15, 2017
24f3f47
put communicate back in
bearney74 Mar 15, 2017
4f9709d
fix syntax error
bearney74 Mar 15, 2017
2e9f460
Update test_misc.py
bearney74 Mar 15, 2017
2c70ab2
Merge branch 'master' of github.com:Zulko/moviepy
bearney74 Mar 15, 2017
29089b2
Merge branch 'master' of github.com:Zulko/moviepy
bearney74 Mar 30, 2017
f54556c
Merge branch 'master' of github.com:Zulko/moviepy
bearney74 Mar 31, 2017
17d882d
add Dockerfile; modify tests
bearney74 Mar 31, 2017
1310c83
add soft link so that ffmpeg can be accessed at command prompt
bearney74 Apr 3, 2017
1c16e6d
add ffmpeg soft link comment, remove unnecessary comment.
bearney74 Apr 3, 2017
cbb0571
modify source of Dockerfile
bearney74 Apr 3, 2017
9317774
fix conflict in Dockerfile
bearney74 Apr 3, 2017
4a90a9e
add basic docker documentation
bearney74 Apr 3, 2017
5cbfa01
move rst to md
bearney74 Apr 3, 2017
6c22be9
fix docker container name
bearney74 Apr 3, 2017
50bf162
clarify docs
bearney74 Apr 4, 2017
3519ad2
modify md code segments to rst code comments
bearney74 Apr 4, 2017
5e24305
modify md code segments to rst code comments
bearney74 Apr 4, 2017
b0f2ce6
modify md code segments to rst code comments
bearney74 Apr 4, 2017
463c9d8
modify md code segments to rst code comments
bearney74 Apr 4, 2017
b1ea13c
modify md code segments to rst code comments
bearney74 Apr 4, 2017
bb441ff
modify md code segments to rst code comments
bearney74 Apr 4, 2017
78caa6d
modify md code segments to rst code comments
bearney74 Apr 4, 2017
4775a99
fix code
bearney74 Apr 4, 2017
862987c
fix code
bearney74 Apr 4, 2017
ac73b78
fix code
bearney74 Apr 4, 2017
ba8b1a1
fix code
bearney74 Apr 4, 2017
1d2d3f0
fix code
bearney74 Apr 4, 2017
c9dcc17
fix code
bearney74 Apr 4, 2017
76f09cd
fix code
bearney74 Apr 4, 2017
65d5463
fix code
bearney74 Apr 4, 2017
b085e16
fix code
bearney74 Apr 4, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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

# install from github since there are bugs in latest versions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this comment now.

RUN git clone https://github.com/Zulko/moviepy.git /var/src/moviepy
RUN cd /var/src/moviepy/ && python setup.py install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the Dockerfile is going to be included with the source, we won't need to pull down from git, we can just include it like this.

ADD . /var/src/moviepy/
RUN cd /var/src/moviepy/ && python setup.py install

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this comment might get lost. Commenting again in the thread, incase it does.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-commenting since it is no longer showing up.

Since the Dockerfile is going to be included with the source, we won't need to pull down from git, we can just include it like this.

ADD . /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()"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will install ffmpeg into a weird location not in the path, should we add a symlink or something to put in in a location that is more common?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure.. I'll work on adding that.. Thanks for pointing this out.


# 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
41 changes: 27 additions & 14 deletions tests/test_PR.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,41 @@

from moviepy.editor import *

import sys
sys.path.append("tests")
import download_media
from test_helper import PYTHON_VERSION, TMP_DIR, TRAVIS

def test_download_media(capsys):
with capsys.disabled():
download_media.download()

def test_PR_306():
if TRAVIS:
return

#put this back in once we get ImageMagick working on travis-ci
#assert TextClip.list('font') != []
#assert TextClip.list('color') != []
assert TextClip.list('font') != []
assert TextClip.list('color') != []

#with pytest.raises(Exception, message="Expecting Exception"):
# TextClip.list('blah')
pass
with pytest.raises(Exception, message="Expecting Exception"):
TextClip.list('blah')


def test_PR_339():
if TRAVIS:
return

#in caption mode
#overlay = TextClip(txt='foo',
# color='white',
# size=(640, 480),
# method='caption',
# align='center',
# fontsize=25)
overlay = TextClip(txt='foo',
color='white', font="Liberation-Mono",
size=(640, 480),
method='caption',
align='center',
fontsize=25)

#in_label_mode
#overlay = TextClip(txt='foo', method='label')
pass
overlay = TextClip(txt='foo', font="Liberation-Mono", method='label')


def test_PR_424():
Expand All @@ -44,7 +56,8 @@ def test_PR_424():

def test_PR_458():
clip = ColorClip([1000, 600], color=(60, 60, 60), duration=10)
clip.write_videofile("test.mp4", progress_bar=False, fps=30)
clip.write_videofile(os.path.join(TMP_DIR, "test.mp4"),
progress_bar=False, fps=30)


def test_PR_515():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_subtitles():
if TRAVIS:
return

generator = lambda txt: TextClip(txt, font='Georgia-Regular',
generator = lambda txt: TextClip(txt, font='Liberation-Mono',
size=(800,600), fontsize=24,
method='caption', align='South',
color='white')
Expand Down