Skip to content

Commit 6797c1c

Browse files
committed
chagne shared lib.
1 parent b6a5579 commit 6797c1c

File tree

1 file changed

+16
-39
lines changed

1 file changed

+16
-39
lines changed

ffmpeg/Dockerfile

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RUN rm -fr /var/lib/apt/lists/* && \
5252
automake \
5353
build-essential \
5454
ca-certificates \
55+
curl \
5556
dkms \
5657
fonts-nanum \
5758
fonts-nanum-coding \
@@ -263,6 +264,9 @@ RUN python3 -m pip install --no-cache-dir \
263264
nvidia-pyindex==1.0.5 \
264265
matplotlib==3.3.3
265266

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+
266270
# Instaling NASM
267271
WORKDIR /usr/local/ffmpeg_sources
268272
RUN set -xe && \
@@ -316,7 +320,7 @@ RUN set -xe && \
316320
git -C libvpx pull 2> /dev/null || \
317321
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
318322
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 && \
320324
make -j$(nproc) && \
321325
make install
322326

@@ -327,7 +331,7 @@ RUN set -xe && \
327331
git clone --depth 1 https://github.com/mstorsjo/fdk-aac && \
328332
cd fdk-aac && \
329333
autoreconf -fiv && \
330-
./configure --disable-shared && \
334+
./configure --enable-shared && \
331335
make -j$(nproc) && \
332336
make install
333337

@@ -340,7 +344,7 @@ RUN set -xe && \
340344
tar xzvf /usr/local/ffmpeg_sources/lame.tar.gz \
341345
-C /usr/local/ffmpeg_sources/lame --strip-components 1 && \
342346
cd /usr/local/ffmpeg_sources/lame && \
343-
./configure --disable-shared --enable-nasm && \
347+
./configure --enable-shared --enable-nasm && \
344348
make -j$(nproc) && \
345349
make install
346350

@@ -351,21 +355,10 @@ RUN set -xe && \
351355
git clone --depth 1 https://github.com/xiph/opus && \
352356
cd opus && \
353357
./autogen.sh && \
354-
./configure --disable-shared && \
358+
./configure --enable-shared && \
355359
make -j$(nproc) && \
356360
make install
357361

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-
369362
# install nvidias codec API
370363
WORKDIR /usr/local/ffmpeg_sources
371364
RUN set -xe && \
@@ -384,34 +377,33 @@ RUN set -xe && \
384377
-C /usr/local/ffmpeg_sources/ffmpeg --strip-components 1 && \
385378
cd /usr/local/ffmpeg_sources/ffmpeg && \
386379
./configure \
387-
--pkg-config-flags="--static" \
388380
--extra-libs="-lpthread -lm" \
389381
--enable-gpl \
390-
--enable-openssl \
391-
--enable-libaom \
392382
--enable-libass \
393383
--enable-libnpp \
384+
--enable-shared \
394385
--enable-libfdk-aac \
395386
--enable-libfreetype \
396387
--enable-libmp3lame \
397388
--enable-libopus \
398-
--enable-libsvtav1 \
399389
--enable-libvorbis \
400-
--enable-libsnappy \
401-
--enable-libvpx \
390+
--enable-libvpx \
402391
--enable-libx264 \
403392
--enable-libx265 \
404-
--enable-shared \
405393
--enable-cuda \
406-
--enable-pic \
407394
--enable-cuvid \
408395
--enable-nvenc \
409396
--enable-libnpp \
397+
--enable-shared \
398+
--enable-pic \
399+
--enable-indev=v4l2 \
400+
--enable-libtensorflow \
410401
--extra-cflags=-I/usr/local/cuda/include \
411402
--extra-ldflags=-L/usr/local/cuda/lib64 \
412403
--enable-nonfree && \
413404
make -j$(nproc) && \
414-
make install
405+
make install && \
406+
ldconfig
415407

416408
RUN ln -s /usr/include/x86_64-linux-gnu/cudnn_v7.h /usr/local/cuda/include/cudnn.h
417409

@@ -468,7 +460,6 @@ RUN cd /tmp/opencv-${OPENCV_VERSION}/cmake_binary && \
468460
-D BUILD_SHARED_LIBS=ON \
469461
-D CMAKE_BUILD_TYPE=RELEASE \
470462
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
471-
# -D CUDA_ARCH_BIN=7.5 \
472463
-D CUDA_ARCH_PTX=7.5 \
473464
-D CUDA_BIN_PATH=/usr/local/cuda \
474465
-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 && \
541532
-D CMAKE_INSTALL_PREFIX=/usr/local \
542533
.. 2>&1 | tee cmake_messages.txt
543534
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
546535
RUN rm /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1
547536

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-
560537

561538
# Stream transcoding
562539
COPY ./scripts/bootstrap.sh /opt/container/bootstrap.sh

0 commit comments

Comments
 (0)