This repository has been archived on 2021-01-24. You can view files and clone it, but cannot push or open issues or pull requests.
vapoursynth/Dockerfile
Simon Bruder 1866ce8bd8
Add functions to PYTHONPATH
Standalone python3 and ipython manage to include the current working
directory in sys.path without any configuration, vspipe and vsedit
somehow do not.
2020-03-07 12:31:19 +00:00

112 lines
4.4 KiB
Docker

FROM debian:testing
RUN echo 'deb http://ftp-stud.hs-esslingen.de/pub/Mirrors/debian-multimedia/ testing main' > /etc/apt/sources.list.d/deb-multimedia.list \
&& apt-get update -oAcquire::AllowInsecureRepositories=true \
&& apt-get -y --allow-unauthenticated install deb-multimedia-keyring \
&& rm -rf /var/lib/apt/lists
RUN apt-get update \
&& apt-get -y install \
autoconf \
beignet-opencl-icd \
clinfo \
ffmpeg \
git \
libtool \
pocl-opencl-icd \
python3-pip \
vapoursynth \
vapoursynth-* \
wget \
x264 \
x265 \
&& rm -rf /var/lib/apt/lists
# required for DCTFilter
RUN cd /tmp \
&& wget http://www.fftw.org/fftw-3.3.8.tar.gz \
&& tar xvf fftw-3.3.8.tar.gz \
&& cd fftw-3.3.8 \
&& ./configure \
--enable-shared \
--enable-threads \
--enable-openmp \
--enable-sse2 \
--enable-avx2 \
--enable-float \
&& make -j 4 install \
&& cd .. \
&& rm -rf fftw-3.3.8
RUN cd /tmp \
&& git clone --depth=1 https://github.com/HomeOfVapourSynthEvolution/VapourSynth-DCTFilter \
&& cd VapourSynth-DCTFilter \
&& ./autogen.sh \
&& ./configure --libdir=/usr/lib/x86_64-linux-gnu/vapoursynth \
&& make install \
&& cd .. \
&& rm -rf VapourSynth-DCTFilter
RUN cd /tmp \
&& git clone --depth=1 https://github.com/MonoS/VS-ContinuityFixer \
&& cd VS-ContinuityFixer \
&& sed -i \
-e 's/VapourSynth\.h/vapoursynth\/VapourSynth.h/' \
-e 's/VSHelper\.h/vapoursynth\/VSHelper.h/' \
continuity.cpp \
&& g++ -shared -fPIC -O2 -msse2 -mfpmath=sse continuity.cpp -o continuity.so \
&& cp continuity.so /usr/lib/x86_64-linux-gnu/vapoursynth/ \
&& cd .. \
&& rm -rf VS-ContinuityFixer
# double speed for getnative
RUN cd /tmp/ \
&& git clone --depth=1 https://github.com/BluBb-mADe/vapoursynth-descale \
&& cd vapoursynth-descale \
&& g++ -std=c++17 -shared -fPIC -O2 descale.cpp -o libdescale.so \
&& cp descale.py /usr/lib/python3/dist-packages/ \
&& cp libdescale.so /usr/lib/x86_64-linux-gnu/vapoursynth/ \
&& cd .. \
&& rm -rf vapoursynth-descale
RUN pip3 --no-cache-dir install \
matplotlib \
tqdm \
yuuno 'prompt-toolkit<2.1.0,>=2.0.0' \
&& yuuno jupyter install
ENV PYTHONPATH=/data/functions/:/usr/local/lib/vapoursynth-scripts/
ARG CACHEBUST_SCRIPTS=1
RUN mkdir /usr/local/lib/vapoursynth-scripts/ \
&& wget -nv -P /usr/local/lib/vapoursynth-scripts/ \
https://gist.github.com/4re/342624c9e1a144a696c6/raw/08df48752c70c66df4127f2791bbedbc1958da77/nnedi3_rpow2.py \
https://gist.github.com/YamashitaRen/020c497524e794779d9c/raw/2a20385e50804f8b24f2a2479e2c0f3c335d4853/edi_rpow2.py \
https://github.com/HomeOfVapourSynthEvolution/havsfunc/raw/master/havsfunc.py \
https://github.com/HomeOfVapourSynthEvolution/mvsfunc/raw/master/mvsfunc.py \
https://github.com/HomeOfVapourSynthEvolution/vsTAAmbk/raw/master/vsTAAmbk.py \
https://github.com/IFeelBloated/Oyster/raw/master/Oyster.py \
https://github.com/IFeelBloated/vapoursynth-mvtools-sf/raw/master/src/mvmulti.py \
https://github.com/Infiziert90/getnative/raw/master/getnative.py \
https://github.com/Irrational-Encoding-Wizardry/fvsfunc/raw/master/fvsfunc.py \
https://github.com/Irrational-Encoding-Wizardry/kagefunc/raw/master/kagefunc.py \
https://github.com/Irrational-Encoding-Wizardry/vsutil/raw/master/vsutil.py \
https://github.com/WolframRhodium/muvsfunc/raw/master/muvsfunc.py \
https://github.com/dubhater/vapoursynth-adjust/raw/master/adjust.py \
https://github.com/theChaosCoder/lostfunc/raw/master/lostfunc.py \
&& chmod 755 /usr/local/lib/vapoursynth-scripts/*
# models are at wrong location (whyever the package installs it there)
RUN cp -r /usr/share/vapoursynth-waifu2x-models/ /usr/lib/x86_64-linux-gnu/vapoursynth/models/
RUN adduser --disabled-password --gecos '' vapoursynth
USER vapoursynth
RUN mkdir /home/vapoursynth/.fonts/ \
&& wget -nv -P /home/vapoursynth/.fonts/ \
https://s3.sbruder.de/cdn/fonts/Iosevka/iosevka-sbruder/ttf/iosevka-sbruder-bold.ttf \
https://s3.sbruder.de/cdn/fonts/Iosevka/iosevka-sbruder/ttf/iosevka-sbruder-bolditalic.ttf \
https://s3.sbruder.de/cdn/fonts/Iosevka/iosevka-sbruder/ttf/iosevka-sbruder-italic.ttf \
https://s3.sbruder.de/cdn/fonts/Iosevka/iosevka-sbruder/ttf/iosevka-sbruder-regular.ttf