/
Dockerfile
36 lines (27 loc) · 1.11 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM nvidia/cuda:10.0-devel-ubuntu18.04 as builder
ENV NASM_VERSION 2.14
ENV NVCODEC_VERSION 8.2.15.6
ENV FFMPEG_VERSION 4.1
RUN apt-get update && apt-get install -y autoconf curl git pkg-config
RUN curl -fsSLO https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/nasm-$NASM_VERSION.tar.bz2 \
&& tar -xjf nasm-$NASM_VERSION.tar.bz2 \
&& cd nasm-$NASM_VERSION \
&& ./autogen.sh \
&& ./configure \
&& make -j$(nproc) \
&& make install
RUN git clone -b n$NVCODEC_VERSION --depth 1 https://git.videolan.org/git/ffmpeg/nv-codec-headers \
&& cd nv-codec-headers \
&& make install
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
RUN curl -fsSLO https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 \
&& tar -xjf ffmpeg-$FFMPEG_VERSION.tar.bz2 \
&& cd ffmpeg-$FFMPEG_VERSION \
&& ./configure --enable-nvenc \
&& make -j$(nproc) \
&& make install
FROM nvidia/cuda:10.0-runtime-ubuntu18.04
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility
COPY --from=builder /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=builder /usr/local/bin/ffprobe /usr/local/bin/ffprobe