-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-nvenc12
112 lines (110 loc) · 2.65 KB
/
Dockerfile-nvenc12
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# syntax=docker/dockerfile:1
FROM debian:10.10-slim
#
MAINTAINER Allan-Nava
#
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES all
ENV DEBIAN_FRONTEND noninterac1tive
#
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
#
WORKDIR /app
#
## Prepare
RUN apt-get update
RUN apt-get install -y \
curl diffutils file coreutils m4 xz-utils nasm python3 python3-pip appstream
## Install dependencies
RUN apt-get install -y \
autoconf automake build-essential cmake git libass-dev libbz2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjansson-dev liblzma-dev libmp3lame-dev libnuma-dev libogg-dev libopus-dev libsamplerate-dev libspeex-dev libtheora-dev libtool libtool-bin libturbojpeg0-dev libvorbis-dev libx264-dev libxml2-dev libvpx-dev m4 make nasm ninja-build patch pkg-config python tar zlib1g-dev autopoint imagemagick gsfonts wget
#
##
RUN git clone https://github.com/FFmpeg/nv-codec-headers.git \
&& cd nv-codec-headers \
&& make \
&& make install
#
RUN wget https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.xz \
&& tar -xf ffmpeg-5.1.2.tar.xz \
&& rm ffmpeg-5.1.2.tar.xz
#
# Configure and build ffmpeg with nvenc support
RUN cd ffmpeg-5.1.2 \
&& ./configure --prefix=/usr/local \
--enable-nonfree\
--enable-nvenc\
--enable-gpl\
--enable-version3\
--enable-static\
--disable-debug\
--disable-ffplay\
--disable-indev=sndio\
--disable-outdev=sndio\
--cc=gcc\
--enable-fontconfig\
--enable-gray\
--enable-libmp3lame\
--enable-libopus\
--enable-libvpx\
--enable-libx264 \
--extra-cflags=-I/usr/local/cuda/include \
--extra-ldflags=-L/usr/local/cuda/lib64 \
&& make install \
&& cd ..
#
## Runtime dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
# For optical drive listing:
lsscsi \
# For watchfolder
bash \
coreutils \
yad \
findutils \
expect \
tcl8.6 \
wget \
git
#
## Docker dependencies
RUN apt-get install -y \
libass9 \
libavcodec-extra58 \
libavfilter-extra7 \
libavformat58 \
libavutil56 \
libbluray2 \
libc6 \
libcairo2 \
libdvdnav4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgstreamer-plugins-base1.0-0 \
libgstreamer1.0-0 \
libgtk-3-0 \
libgudev-1.0-0 \
libjansson4 \
libpango-1.0-0 \
libsamplerate0 \
libswresample3 \
libswscale5 \
libtheora0 \
libvorbis0a \
libvorbisenc2 \
libxml2 \
libturbojpeg0 \
libdvdread4 \
libx264-155 \
libx265-165
#
#
#
#RUN echo "Compiled ffmpeg nvenc..."
#
######################################################################
#
CMD ["/bin/bash"]
#