@@ -52,6 +52,7 @@ RUN rm -fr /var/lib/apt/lists/* && \
52
52
automake \
53
53
build-essential \
54
54
ca-certificates \
55
+ curl \
55
56
dkms \
56
57
fonts-nanum \
57
58
fonts-nanum-coding \
@@ -263,6 +264,9 @@ RUN python3 -m pip install --no-cache-dir \
263
264
nvidia-pyindex==1.0.5 \
264
265
matplotlib==3.3.3
265
266
267
+ # Install libtensorflow
268
+ RUN curl -fsSL https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.1.tar.gz | tar -xzC /usr/local -f -
269
+
266
270
# Instaling NASM
267
271
WORKDIR /usr/local/ffmpeg_sources
268
272
RUN set -xe && \
@@ -316,7 +320,7 @@ RUN set -xe && \
316
320
git -C libvpx pull 2> /dev/null || \
317
321
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
318
322
cd /usr/local/ffmpeg_sources/libvpx && \
319
- ./configure --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm && \
323
+ ./configure --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-shared && \
320
324
make -j$(nproc) && \
321
325
make install
322
326
@@ -327,7 +331,7 @@ RUN set -xe && \
327
331
git clone --depth 1 https://github.com/mstorsjo/fdk-aac && \
328
332
cd fdk-aac && \
329
333
autoreconf -fiv && \
330
- ./configure --disable -shared && \
334
+ ./configure --enable -shared && \
331
335
make -j$(nproc) && \
332
336
make install
333
337
@@ -340,7 +344,7 @@ RUN set -xe && \
340
344
tar xzvf /usr/local/ffmpeg_sources/lame.tar.gz \
341
345
-C /usr/local/ffmpeg_sources/lame --strip-components 1 && \
342
346
cd /usr/local/ffmpeg_sources/lame && \
343
- ./configure --disable -shared --enable-nasm && \
347
+ ./configure --enable -shared --enable-nasm && \
344
348
make -j$(nproc) && \
345
349
make install
346
350
@@ -351,21 +355,10 @@ RUN set -xe && \
351
355
git clone --depth 1 https://github.com/xiph/opus && \
352
356
cd opus && \
353
357
./autogen.sh && \
354
- ./configure --disable -shared && \
358
+ ./configure --enable -shared && \
355
359
make -j$(nproc) && \
356
360
make install
357
361
358
- # SCT-AV1
359
- WORKDIR /usr/local/ffmpeg_sources
360
- RUN set -xe && \
361
- git -C SVT-AV1 pull 2> /dev/null || \
362
- git clone --depth=1 https://github.com/OpenVisualCloud/SVT-AV1 && \
363
- cd SVT-AV1 && \
364
- cd Build && \
365
- cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && \
366
- make -j $(nproc) && \
367
- make install
368
-
369
362
# install nvidias codec API
370
363
WORKDIR /usr/local/ffmpeg_sources
371
364
RUN set -xe && \
@@ -384,34 +377,33 @@ RUN set -xe && \
384
377
-C /usr/local/ffmpeg_sources/ffmpeg --strip-components 1 && \
385
378
cd /usr/local/ffmpeg_sources/ffmpeg && \
386
379
./configure \
387
- --pkg-config-flags="--static" \
388
380
--extra-libs="-lpthread -lm" \
389
381
--enable-gpl \
390
- --enable-openssl \
391
- --enable-libaom \
392
382
--enable-libass \
393
383
--enable-libnpp \
384
+ --enable-shared \
394
385
--enable-libfdk-aac \
395
386
--enable-libfreetype \
396
387
--enable-libmp3lame \
397
388
--enable-libopus \
398
- --enable-libsvtav1 \
399
389
--enable-libvorbis \
400
- --enable-libsnappy \
401
- --enable-libvpx \
390
+ --enable-libvpx \
402
391
--enable-libx264 \
403
392
--enable-libx265 \
404
- --enable-shared \
405
393
--enable-cuda \
406
- --enable-pic \
407
394
--enable-cuvid \
408
395
--enable-nvenc \
409
396
--enable-libnpp \
397
+ --enable-shared \
398
+ --enable-pic \
399
+ --enable-indev=v4l2 \
400
+ --enable-libtensorflow \
410
401
--extra-cflags=-I/usr/local/cuda/include \
411
402
--extra-ldflags=-L/usr/local/cuda/lib64 \
412
403
--enable-nonfree && \
413
404
make -j$(nproc) && \
414
- make install
405
+ make install && \
406
+ ldconfig
415
407
416
408
RUN ln -s /usr/include/x86_64-linux-gnu/cudnn_v7.h /usr/local/cuda/include/cudnn.h
417
409
@@ -468,7 +460,6 @@ RUN cd /tmp/opencv-${OPENCV_VERSION}/cmake_binary && \
468
460
-D BUILD_SHARED_LIBS=ON \
469
461
-D CMAKE_BUILD_TYPE=RELEASE \
470
462
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)" ) \
471
- # -D CUDA_ARCH_BIN=7.5 \
472
463
-D CUDA_ARCH_PTX=7.5 \
473
464
-D CUDA_BIN_PATH=/usr/local/cuda \
474
465
-D CUDA_CUDA_LIBRARY=/usr/lib/x86_64-linux-gnu/stubs/libcuda.so \
@@ -541,22 +532,8 @@ RUN cd /tmp/opencv-${OPENCV_VERSION}/cmake_binary && \
541
532
-D CMAKE_INSTALL_PREFIX=/usr/local \
542
533
.. 2>&1 | tee cmake_messages.txt
543
534
RUN cd /tmp/opencv-4.5.2/cmake_binary && ninja
544
- # cd /tmp/opencv-4.5.2/cmake_binary && \
545
- # make -j$(nproc) && make install
546
535
RUN rm /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1
547
536
548
- RUN set -xe && \
549
- apt update -y && \
550
- apt install sudo && \
551
- git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose && \
552
- cd /usr/local/openpose && \
553
- bash ./scripts/ubuntu/install_deps.sh && \
554
- mkdir -p /usr/local/openpose/build && \
555
- cd /usr/local/openpose/build && \
556
- cmake .. && \
557
- make -j$(nproc) && \
558
- make install
559
-
560
537
561
538
# Stream transcoding
562
539
COPY ./scripts/bootstrap.sh /opt/container/bootstrap.sh
0 commit comments