imageio / imageio-binaries

Repo to place the (relatively small) binary libraries
145 stars 140 forks source link

Commit 3104b27 breaks ffmpeg download for older versions of imageio #11

Closed phil-peshin closed 5 years ago

phil-peshin commented 5 years ago

Commit 3104b27 breaks ffmpeg download for older versions of imageio. For example 2.1.2. It used to download files named like "ffmpeg.linux64", and imageio.plugins.ffmpeg.download() now fails with 404 error

I recommend to revert this commit.

almarklein commented 5 years ago

Done.

I had assumed that a user with such an old version would not need the files anymore, because they'd likely be already be downloaded earlier. Out of curiosity, could you explain your scenario for needing these binaries with that version of imageio?

phil-peshin commented 5 years ago

Thank you!

Here is our scenario: we build a base docker image with packages from requirements.txt. Every time we update/add a package to it we rebuilt it. But we are not necessary update other packages since it would require full regression testing of our system. So we have something like this in our dockerfile:

.....
COPY requirements.txt /src/
RUN apt-get install -y postgresql-client libcurl4-openssl-dev libssl-dev libmemcached-dev zlib1g-dev &&\
    apt-get clean all
RUN pip install -U -r /src/requirements.txt
RUN python -c 'import imageio; imageio.plugins.ffmpeg.download()'
.....

So the step to download ffmpeg binary into the docker image is executed every time we update some other packages.

I think for the future it will be better to have a configuration to point to location of ffmpeg binary instead (or in addition to) of having a method to download it. I understand that download method is very convenient, but it has it's disadvantages of having to maintain a public repository of older binaries for all platforms, for a long long time :(

almarklein commented 5 years ago

Thanks for the explanation. That makes a lot of sense. I shall indeed be more careful next time :)

I'm actually working on a new approach for ffmpeg, creating a new small library with the low level ffmpeg wrapper, and which includes the ffmpeg binary in platform specific wheels. (At the time when I decided for the download approach there was no such thing as platform specifics wheels :)).