-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathDockerfile_minimal
366 lines (303 loc) · 19.4 KB
/
Dockerfile_minimal
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
############################
# FFMPEG
############################
FROM archlinux AS ffmpeg-arch
RUN --mount=type=cache,sharing=locked,target=/var/cache/pacman \
pacman -Syu --noconfirm --needed base base-devel cuda git
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ARG user=makepkg
RUN useradd --system --create-home $user && \
echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" >/etc/sudoers.d/$user
USER $user
WORKDIR /home/$user
RUN git clone https://aur.archlinux.org/yay-bin.git && \
cd yay-bin && \
makepkg -si --noconfirm
RUN yay -Syu rust tcl nasm cmake jq libtool wget fribidi fontconfig libsoxr meson pod2man nvidia-utils base-devel --noconfirm --ask 4
RUN yay -S python-pip python312 --noconfirm --ask 4
USER root
RUN mkdir -p "/home/makepkg/python312"
RUN wget https://github.com/python/cpython/archive/refs/tags/v3.12.5.tar.gz && tar xf v3.12.5.tar.gz && cd cpython-3.12.5 && \
mkdir debug && cd debug && ../configure --enable-optimizations --disable-shared --prefix="/home/makepkg/python312" && make -j$(nproc) && make install && \
/home/makepkg/python312/bin/python3.12 -m ensurepip --upgrade
RUN cp /home/makepkg/python312/bin/python3.12 /usr/bin/python
ENV PYTHONPATH /home/makepkg/python312/bin/
ENV PATH "/home/makepkg/python312/bin/:$PATH"
RUN pip3 install "cython<3" meson
ENV PATH "$PATH:/opt/cuda/bin/nvcc"
ENV PATH "$PATH:/opt/cuda/bin"
ENV LD_LIBRARY_PATH "/opt/cuda/lib64"
# -O3 makes sure we compile with optimization. setting CFLAGS/CXXFLAGS seems to override
# default automake cflags.
# -static-libgcc is needed to make gcc not include gcc_s as "as-needed" shared library which
# cmake will include as a implicit library.
# other options to get hardened build (same as ffmpeg hardened)
ARG CFLAGS="-O3 -static-libgcc -fno-strict-overflow -fstack-protector-all -fPIE"
ARG CXXFLAGS="-O3 -static-libgcc -fno-strict-overflow -fstack-protector-all -fPIE"
ARG LDFLAGS="-Wl,-z,relro,-z,now"
# todo: use https://bitbucket.org/the-sekrit-twc/zimg/src/master/
# master is broken https://github.com/sekrit-twc/zimg/issues/181
# No rule to make target 'graphengine/graphengine/cpuinfo.cpp', needed by 'graphengine/graphengine/libzimg_internal_la-cpuinfo.lo'. Stop.
RUN wget https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz && tar -zxvf release-3.0.5.tar.gz && cd zimg-release-3.0.5 && \
./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
ENV PATH /usr/local/bin:$PATH
RUN wget https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R70.tar.gz && \
tar -zxvf R70.tar.gz && cd vapoursynth-R70 && ./autogen.sh && \
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" ./configure --enable-static --disable-shared && \
make && make install && cd .. && ldconfig
RUN git clone https://github.com/gypified/libmp3lame && cd libmp3lame && ./configure --enable-static --enable-nasm --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/mstorsjo/fdk-aac/ && \
cd fdk-aac && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/xiph/ogg && cd ogg && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/xiph/vorbis && cd vorbis && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/xiph/opus && cd opus && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/xiph/theora && cd theora && ./autogen.sh && ./configure --disable-examples --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/webmproject/libvpx/ && \
cd libvpx && ./configure --enable-static --enable-vp9-highbitdepth --disable-shared --disable-unit-tests --disable-examples && \
make -j$(nproc) install
RUN git clone https://code.videolan.org/videolan/x264.git && \
cd x264 && ./configure --enable-pic --enable-static && make -j$(nproc) install
# -w-macro-params-legacy to not log lots of asm warnings
# https://bitbucket.org/multicoreware/x265_git/issues/559/warnings-when-assembling-with-nasm-215
RUN git clone https://bitbucket.org/multicoreware/x265_git/ && cd x265_git/build/linux && \
cmake -G "Unix Makefiles" -DENABLE_SHARED=OFF -D HIGH_BIT_DEPTH:BOOL=ON -DENABLE_AGGRESSIVE_CHECKS=ON ../../source -DCMAKE_ASM_NASM_FLAGS=-w-macro-params-legacy && \
make -j$(nproc) install
RUN git clone https://github.com/webmproject/libwebp/ && \
cd libwebp && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/xiph/speex/ && \
cd speex && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone --depth 1 https://aomedia.googlesource.com/aom && \
cd aom && \
mkdir build_tmp && cd build_tmp && cmake -DBUILD_SHARED_LIBS=0 -DENABLE_TESTS=0 -DENABLE_NASM=on -DCMAKE_INSTALL_LIBDIR=lib .. && make -j$(nproc) install
RUN git clone https://github.com/georgmartius/vid.stab/ && \
cd vid.stab && cmake -DBUILD_SHARED_LIBS=OFF . && make -j$(nproc) install
RUN git clone https://github.com/ultravideo/kvazaar/ && \
cd kvazaar && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
RUN git clone https://github.com/libass/libass/ && \
cd libass && ./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) && make install
RUN git clone https://github.com/uclouvain/openjpeg/ && \
cd openjpeg && cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF && make -j$(nproc) install
RUN git clone https://code.videolan.org/videolan/dav1d/ && \
cd dav1d && meson build --buildtype release -Ddefault_library=static && ninja -C build install
# add extra CFLAGS that are not enabled by -O3
# http://websvn.xvid.org/cvs/viewvc.cgi/trunk/xvidcore/build/generic/configure.in?revision=2146&view=markup
ARG XVID_VERSION=1.3.7
ARG XVID_URL="https://downloads.xvid.com/downloads/xvidcore-$XVID_VERSION.tar.gz"
ARG XVID_SHA256=abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d
RUN wget -O libxvid.tar.gz "$XVID_URL" && \
echo "$XVID_SHA256 libxvid.tar.gz" | sha256sum --status -c - && \
tar xf libxvid.tar.gz && \
cd xvidcore/build/generic && \
CFLAGS="$CFLAGS -fstrength-reduce -ffast-math" \
./configure && make -j$(nproc) && make install
RUN rm -rf rav1e && \
git clone https://github.com/xiph/rav1e/ && \
cd rav1e && \
cargo install cargo-c && \
cargo cinstall --release --library-type=staticlib --crt-static && \
sed -i 's/-lgcc_s//' /usr/local/lib/pkgconfig/rav1e.pc
RUN git clone https://github.com/Haivision/srt/ && \
cd srt && ./configure --enable-shared=0 --cmake-install-libdir=lib --cmake-install-includedir=include --cmake-install-bindir=bin && \
make -j$(nproc) && make install
RUN git clone https://github.com/gianni-rosato/svt-av1-psy/ && \
cd svt-av1-psy/Build && \
cmake .. -G"Unix Makefiles" -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release && \
make -j$(nproc) install
RUN git clone https://github.com/pkuvcl/davs2/ && \
cd davs2/build/linux && ./configure --disable-asm --enable-pic && \
make -j$(nproc) install
RUN git clone https://github.com/Netflix/vmaf/ && \
cd vmaf/libvmaf && meson build --buildtype release -Ddefault_library=static && ninja -vC build install
RUN git clone https://github.com/cisco/openh264 && \
cd openh264 && meson build --buildtype release -Ddefault_library=static && ninja -C build install
RUN git clone https://github.com/FFmpeg/nv-codec-headers && cd nv-codec-headers && make -j$(nproc) && make install
RUN git clone https://github.com/mpeg5/xeve && cd xeve && mkdir build && cd build && cmake .. && make -j$(nproc) && make install
RUN rm -rf /usr/local/lib/libxeve.so*
# https://github.com/shadowsocks/shadowsocks-libev/issues/623
RUN mkdir -p "/home/makepkg/ssl"
RUN git clone https://github.com/openssl/openssl && cd openssl && LIBS="-ldl -lz" LDFLAGS="-Wl,-static -static -static-libgcc -s" \
./config no-shared -static --prefix="/home/makepkg/ssl" --openssldir="/home/makepkg/ssl" && \
sed -i 's/^LDFLAGS = /LDFLAGS = -all-static -s/g' Makefile && make -j$(nproc) && make install_sw && make install
# todo: can't figure out "ERROR: failed checking for nvcc", may be gcc version mismatch
# https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version
# https://github.com/NVIDIA/cuda-samples/issues/46#issuecomment-2030697518
# openssl static
# https://stackoverflow.com/questions/18185618/how-to-use-static-linking-with-openssl-in-c-c
RUN git clone https://github.com/FFmpeg/FFmpeg
RUN cd FFmpeg && \
CFLAGS="${CFLAGS} -Wno-incompatible-pointer-types -Wno-implicit-function-declaration" PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/home/makepkg/ssl/lib64/pkgconfig/ ./configure \
--extra-cflags="-march=native -fopenmp -lcrypto -lz -ldl -static-libgcc -I/opt/cuda/include" \
--extra-cxxflags="-march=native -fopenmp -lcrypto -lz -ldl -static-libgcc" \
--extra-ldflags="-L/usr/local/lib/xeve -fopenmp -lcrypto -lz -ldl -static-libgcc -L/opt/cuda/lib64" \
--extra-libs="-lstdc++ -lcrypto -lz -ldl -static-libgcc" \
--pkg-config-flags=--static \
--toolchain=hardened \
--disable-debug \
--disable-shared \
--disable-ffplay \
--enable-static \
--enable-gpl \
--enable-gray \
--enable-nonfree \
--enable-openssl \
--enable-iconv \
--enable-libxml2 \
--enable-libmp3lame \
--enable-libfdk-aac \
--enable-libvorbis \
--enable-libopus \
--enable-libtheora \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libwebp \
--enable-libspeex \
--enable-libaom \
--enable-libvidstab \
--enable-libkvazaar \
--enable-libfreetype \
--enable-fontconfig \
--enable-libfribidi \
--enable-libass \
--enable-libsoxr \
--enable-libopenjpeg \
--enable-libdav1d \
--enable-librav1e \
--enable-libsrt \
--enable-libsvtav1 \
--enable-libdavs2 \
--enable-libvmaf \
--enable-libxeve \
#--enable-cuda-nvcc \ # ERROR: failed checking for nvcc
--enable-vapoursynth \
#--enable-hardcoded-tables \
--enable-libopenh264 \
--enable-optimizations \
#--enable-cuda-llvm \ # ERROR: cuda_llvm requested but not found
--enable-nvdec \
--enable-nvenc \
--enable-cuvid \
--enable-cuda \
--enable-pthreads \
--enable-runtime-cpudetect \
--enable-lto && \
make -j$(nproc)
############################
# bestsource / lsmash / ffms2
# todo: check if CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS="-Wl,-Bsymbolic" --extra-ldflags="-static" is required
############################
FROM nvcr.io/nvidia/tensorrt:24.11-py3 as bestsource-lsmash-ffms2-vs
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR workspace
RUN apt update -y
RUN apt install autoconf libtool nasm ninja-build yasm python3.12 python3.12-venv python3.12-dev python3-pip wget git pkg-config python-is-python3 -y
RUN apt --fix-broken install
RUN pip install meson ninja cython
# install g++13
RUN apt install build-essential manpages-dev software-properties-common -y
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y
RUN apt update -y && apt install gcc-13 g++-13 -y
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13
# zimg
# setting pkg version manually since otherwise 'Version' field value '-1': version number is empty
RUN apt-get install checkinstall -y
RUN wget https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz && tar -zxvf release-3.0.5.tar.gz && cd zimg-release-3.0.5 && \
./autogen.sh && ./configure --enable-static --disable-shared && make -j$(nproc) install
# vapoursynth
RUN wget https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R70.tar.gz && \
tar -zxvf R70.tar.gz && mv vapoursynth-R70 vapoursynth && cd vapoursynth && \
./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-static --disable-shared && make -j$(nproc) && make install && ldconfig
# dav1d
RUN git clone https://code.videolan.org/videolan/dav1d/ && \
cd dav1d && meson build --buildtype release -Ddefault_library=static && ninja -C build install
# Vulkan-Headers
Run apt install cmake -y
RUN git clone https://github.com/KhronosGroup/Vulkan-Headers.git && cd Vulkan-Headers/ && cmake -S . -DBUILD_SHARED_LIBS=OFF -B build/ && cmake --install build
# nv-codec-headers
RUN git clone https://github.com/FFmpeg/nv-codec-headers && cd nv-codec-headers && make -j$(nproc) && make install
# ffmpeg
RUN apt remove ffmpeg -y
RUN git clone https://git.ffmpeg.org/ffmpeg.git --depth 1 && cd ffmpeg && \
CFLAGS=-fPIC ./configure --enable-libdav1d --enable-cuda --enable-nonfree --disable-shared --enable-static --enable-gpl --enable-version3 --disable-programs --disable-doc --disable-avdevice --disable-swresample --disable-postproc --disable-avfilter --disable-encoders --disable-muxers --disable-debug --enable-pic --extra-ldflags="-static" --extra-cflags="-march=native" && \
make -j$(nproc) && make install -j$(nproc)
# jansson
RUN git clone https://github.com/akheron/jansson && cd jansson && autoreconf -fi && CFLAGS=-fPIC ./configure --disable-shared --enable-static && \
make -j$(nproc) && make install
# bzip2
RUN git clone https://github.com/libarchive/bzip2 && cd bzip2 && \
mkdir build && cd build && cmake .. -DBUILD_SHARED_LIBS=OFF && make -j$(nproc) && make install
# bestsource
RUN apt-get install libxxhash-dev -y && git clone https://github.com/styler00dollar/bestsource --depth 1 --recurse-submodules --shallow-submodules && cd bestsource && \
CFLAGS=-fPIC meson setup -Denable_plugin=true build && CFLAGS=-fPIC ninja -C build && ninja -C build install
# ffmpeg (HomeOfAviSynthPlusEvolution version with sws)
# official ffmpeg does not compile
# fatal error: libswresample/swresample.h: No such file or directory
RUN apt remove ffmpeg -y
RUN rm -rf FFmpeg
RUN git clone https://github.com/HomeOfAviSynthPlusEvolution/FFmpeg
RUN cd FFmpeg && \
LDFLAGS="-Wl,-Bsymbolic" CFLAGS=-fPIC ./configure --enable-libdav1d --enable-cuda --enable-nonfree --disable-shared --enable-static --enable-gpl --enable-version3 --disable-programs --disable-doc --disable-avdevice --disable-postproc --disable-avfilter --disable-encoders --disable-muxers --disable-debug --enable-pic --extra-ldflags="-Wl,-Bsymbolic" --extra-cflags="-march=native" && \
make -j$(nproc) && make install -j$(nproc)
# lsmash
RUN git clone https://github.com/l-smash/l-smash && cd l-smash && CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS="-Wl,-Bsymbolic" ./configure --enable-shared --extra-ldflags="-Wl,-Bsymbolic" && \
make -j$(nproc) && make install
RUN git clone https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works && cd L-SMASH-Works && \
cd VapourSynth/ && CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS="-Wl,-Bsymbolic" meson build && CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS="-Wl,-Bsymbolic" ninja -C build && ninja -C build install
# ffms2
RUN apt install autoconf -y
RUN git clone https://github.com/FFMS/ffms2 && cd ffms2 && ./autogen.sh && CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS="-Wl,-Bsymbolic" ./configure --enable-shared && make -j$(nproc) && make install
############################
FROM nvcr.io/nvidia/tensorrt:24.11-py3
ARG DEBIAN_FRONTEND=noninteractive
# cmake
RUN apt-get -y update && apt install wget && wget https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-x86_64.sh && \
chmod +x cmake-3.29.3-linux-x86_64.sh && sh cmake-3.29.3-linux-x86_64.sh --skip-license && \
cp /workspace/bin/cmake /usr/bin/cmake && cp /workspace/bin/cmake /usr/lib/cmake && \
cp /workspace/bin/cmake /usr/local/bin/cmake && cp -r /workspace/share/cmake-3.29 /usr/local/share/ && \
rm -rf cmake-3.29.3-linux-x86_64.sh
RUN apt update -y && apt install git autoconf libtool libglib2.0-dev -y && \
wget https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz && tar -zxvf release-3.0.5.tar.gz && \
cd zimg-release-3.0.5 && ./autogen.sh && ./configure && make -j16 && make install && cd .. && rm -rf zimg-release-3.0.5 release-3.0.5.tar.gz && \
pip install Cython && wget https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R70.tar.gz && \
tar -zxvf R70.tar.gz && cd vapoursynth-R70 && ./autogen.sh && ./configure && make && make install && cd .. && ldconfig && \
ln -s /usr/local/lib/python3.12/site-packages/vapoursynth.so /usr/lib/python3.12/lib-dynload/vapoursynth.so && \
# not deleting vapoursynth-R70 since vs-mlrt needs it
rm -rf R70.tar.gz && pip install vapoursynth && \
apt-get autoclean -y && apt-get autoremove -y && apt-get clean -y && pip cache purge
# vs-mlrt
# upgrading g++
RUN apt install build-essential manpages-dev software-properties-common -y && add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt update -y && apt install gcc-12 g++-12 -y && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 && \
# compiling
git clone https://github.com/AmusementClub/vs-mlrt /workspace/vs-mlrt && cd /workspace/vs-mlrt/vstrt && mkdir build && \
cd build && /workspace/bin/cmake .. -DVAPOURSYNTH_INCLUDE_DIRECTORY=/workspace/vapoursynth-R70/include -D USE_NVINFER_PLUGIN=OFF -D USE_NVINFER_PLUGIN_STATIC=OFF && make -j$(nproc) && make install && \
cd /workspace && rm -rf /workspace/vs-mlrt /workspace/vapoursynth-R70
# ffmpeg
COPY --from=ffmpeg-arch /home/makepkg/FFmpeg/ffmpeg /usr/local/bin/ffmpeg
RUN apt install libxcb1 libxcb-shm0 libxcb-shape0 libxcb-xfixes0 fontconfig libfribidi0 libharfbuzz0b libsoxr0 libdrm-dev -y
# ffmpeg hotfix
RUN wget https://mirrors.edge.kernel.org/ubuntu/pool/main/libt/libtirpc/libtirpc-dev_1.3.4%2Bds-1.3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/libx/libxcrypt/libcrypt-dev_4.4.36-4build1_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/libx/libxcrypt/libcrypt1_4.4.36-4build1_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/libn/libnsl/libnsl-dev_1.3.0-3build3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/g/glibc/libc6_2.40-1ubuntu3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/g/glibc/libc6-dev_2.40-1ubuntu3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/g/glibc/libc-bin_2.40-1ubuntu3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/g/glibc/libc-dev-bin_2.40-1ubuntu3_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/l/linux/linux-libc-dev_6.11.0-12.13_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/r/rpcsvc-proto/rpcsvc-proto_1.4.2-0ubuntu7_amd64.deb \
https://mirrors.edge.kernel.org/ubuntu/pool/main/libt/libtirpc/libtirpc3t64_1.3.4%2Bds-1.3_amd64.deb && dpkg --force-all -i *.deb && rm -rf *deb
COPY --from=ffmpeg-arch /usr/lib/libstdc++.so* /usr/lib/x86_64-linux-gnu/
# copy video readers
COPY --from=bestsource-lsmash-ffms2-vs /usr/local/lib/liblsmash.so* /usr/local/lib/
COPY --from=bestsource-lsmash-ffms2-vs /usr/local/lib/vapoursynth/libvslsmashsource.so* /usr/local/lib/vapoursynth/
COPY --from=bestsource-lsmash-ffms2-vs /usr/local/lib/vapoursynth/bestsource.so* /usr/local/lib/vapoursynth/bestsource.so
COPY --from=bestsource-lsmash-ffms2-vs /usr/local/lib/x86_64-linux-gnu/libbestsource.so* /usr/local/lib/x86_64-linux-gnu/libbestsource.so
COPY --from=bestsource-lsmash-ffms2-vs /usr/local/lib/libffms2.so* /usr/local/lib/
# move trtexec so it can be globally accessed
RUN mv /usr/src/tensorrt/bin/trtexec /usr/bin
ENV CUDA_MODULE_LOADING=LAZY
WORKDIR /workspace/tensorrt