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

Fix Dockerfile #1175

Closed
wants to merge 2 commits into from
Closed

Fix Dockerfile #1175

wants to merge 2 commits into from

Conversation

rikhuijzer
Copy link

@rikhuijzer rikhuijzer commented May 3, 2020

The Dockerfile was broken. The error stated that the package libav-tools was unavailable.
To fix this I have fixed the Python version to python:3.7-stretch since python:3.7-buster does not contain libav-tools. See also the Debian package index.

@rikhuijzer rikhuijzer changed the title Make Debian version explicit Fix Dockerfile May 3, 2020
@coveralls
Copy link

coveralls commented May 3, 2020

Coverage Status

Coverage decreased (-0.02%) to 66.118% when pulling 7029d1f on rikhuijzer:patch-1 into 90e42c1 on Zulko:master.

@tburrows13
Copy link
Collaborator

I wonder if it works if you remove the installation of libav-tools? It seems to be a compatibility layer for ffmpeg, so perhaps we could instead get rid of it entirely? I think that it would be better to remove it than to pin it down to an older version of Debian?

@jonnekaunisto you had some experience with the Docker build, did you have any suggestions?

@jonnekaunisto
Copy link
Contributor

The error that is thrown by the current Dockerfile is:

Package libav-tools is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: ffmpeg

So I believe you can just replace it with ffmpeg instead.

@rikhuijzer
Copy link
Author

Thanks @jonnekaunisto changing to ffmpeg is indeed a much better idea. I just did that and rebuild the Docker image. That works. However, I continued by trying to run some code which depends on ImageMagick and got unable to read font [...]. This is starting to become quite frustrating since I just spend my entire afternoon on a fruitless global MoviePy installation with ImageMagick on NixOS. So, I think this Dockerfile fix will be better than no fix, but it does not seem to deliver a version with a functioning ImageMagick attached.

@rikhuijzer
Copy link
Author

rikhuijzer commented May 3, 2020

This ImageMagick problem might be related to the fairly new comment at #855. I think it might be due to a missing font Courier. This font is used when calling the code from the docs.

@tburrows13
Copy link
Collaborator

In which case, I'm closing this in favour of #1165, which includes this change. I'm not sure about your ImageMagick problem... that program can be quite a pain at times. It is currently only used in TextClips and writing gifs. Gif writing already has alternatives that use different libraries (like pillow and ffmpeg directly), and it is likely that there will be a pillow alternative to TextClip in v2.0 (see #1145), which will heavily reduce the need for ImageMagick.

@tburrows13 tburrows13 closed this May 4, 2020
@rikhuijzer
Copy link
Author

Sounds good. I now solved my ImageMagick problem on NixOS by switching my Python code to a font listed at convert -list font. I do still suspect that the default font for TextClip is Courier which causes problems in all my Docker builds (tried many Debian distributions).

@tburrows13
Copy link
Collaborator

tburrows13 commented May 4, 2020

fyi TextClip.list("font") also lists all fonts available to ImageMagick (all it is is a wrapper around convert -list font).

@tburrows13 tburrows13 added the docker Anything to do with running MoviePy in Docker containers. label May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Anything to do with running MoviePy in Docker containers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants