ffmpeg/Dockerfile

31 lines
1.1 KiB
Docker

FROM debian:11
RUN sed -i 's/main/main non-free contrib/' /etc/apt/sources.list
RUN sed s/^deb/deb-src/ /etc/apt/sources.list > /etc/apt/sources.list.d/sources.list
RUN apt-get update
RUN apt-get -y install nvidia-cuda-toolkit git
RUN apt-get -y build-dep ffmpeg
WORKDIR /usr/local/src
RUN git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
WORKDIR /usr/local/src/nv-codec-headers
RUN make && make install
WORKDIR /usr/local/src/ffmpeg
RUN apt-get source ffmpeg
RUN ls -lah ffmpeg-*/debian/rules
RUN echo 'CONFIG+= --enable-cuda --enable-libnpp --enable-nonfree' >> "$(ls ffmpeg-*/debian/rules)"
RUN cd ffmpeg-* && dpkg-buildpackage -r -b -j$(nproc)
RUN ls *.deb
RUN dpkg -i \
ffmpeg_4.3.3-0+deb11u1_amd64.deb \
libavcodec58_4.3.3-0+deb11u1_amd64.deb \
libavdevice58_4.3.3-0+deb11u1_amd64.deb \
libavfilter7_4.3.3-0+deb11u1_amd64.deb \
libavformat58_4.3.3-0+deb11u1_amd64.deb \
libavresample4_4.3.3-0+deb11u1_amd64.deb \
libavutil56_4.3.3-0+deb11u1_amd64.deb \
libpostproc55_4.3.3-0+deb11u1_amd64.deb \
libswresample3_4.3.3-0+deb11u1_amd64.deb \
libswscale5_4.3.3-0+deb11u1_amd64.deb