File tree Expand file tree Collapse file tree 7 files changed +43
-10
lines changed
Filter options
Expand file tree Collapse file tree 7 files changed +43
-10
lines changed
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ RUN SKIPINSTALL=yes /app/build-ffmpeg --build
14
14
15
15
FROM ubuntu:20.04
16
16
17
+ ENV DEBIAN_FRONTEND noninteractive
18
+
17
19
# install va-driver
18
20
RUN apt-get update \
19
21
&& apt-get -y install libva-drm2 \
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ $ sudo -E docker build --tag=ffmpeg:cuda-$DIST -f cuda-$DIST.dockerfile --build-
129
129
Since we have matched the operating system and version, it should work well with dynamic links. If it doesn't work, edit the ` export.dockerfile ` and copy the necessary libraries and try again.
130
130
131
131
``` bash
132
- $ sudo -E docker build --output type=local,dest=build -f export.dockerfile .
132
+ $ sudo -E docker build --output type=local,dest=build -f export.dockerfile --build-arg DIST= $DIST .
133
133
$ ls build
134
134
bin lib
135
135
$ ls build/bin
Original file line number Diff line number Diff line change 467
467
CONFIGURE_OPTIONS+=(" --enable-libfdk-aac" )
468
468
469
469
470
+ # #
471
+ # # image library
472
+ # #
473
+
474
+ if build " libwebp" ; then
475
+ download " https://github.com/webmproject/libwebp/archive/v1.1.0.tar.gz" " libwebp-1.1.0.tar.gz"
476
+ make_dir build
477
+ cd build || exit
478
+ execute cmake -DCMAKE_INSTALL_PREFIX=" ${WORKSPACE} " -DENABLE_SHARED=OFF -DENABLE_STATIC=ON ../
479
+ execute make -j $MJOBS
480
+ execute make install
481
+
482
+ build_done " libwebp"
483
+ fi
484
+ CONFIGURE_OPTIONS+=(" --enable-libwebp" )
485
+
470
486
# #
471
487
# # other library
472
488
# #
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ ARG VER=8
2
2
3
3
FROM nvidia/cuda:11.1-devel-centos${VER} AS build
4
4
5
- ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
5
+ ENV NVIDIA_VISIBLE_DEVICES all
6
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
6
7
7
8
RUN yum group install -y "Development Tools" \
8
9
&& yum install -y curl libva-devel \
@@ -17,6 +18,9 @@ RUN SKIPINSTALL=yes /app/build-ffmpeg --build
17
18
18
19
FROM centos:${VER}
19
20
21
+ ENV NVIDIA_VISIBLE_DEVICES all
22
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
23
+
20
24
# install va-driver
21
25
RUN yum install -y libva \
22
26
&& rm -rf /var/cache/yum/* \
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ ARG VER=20.04
3
3
FROM nvidia/cuda:11.1-devel-ubuntu${VER} AS build
4
4
5
5
ENV DEBIAN_FRONTEND noninteractive
6
- ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
6
+ ENV NVIDIA_VISIBLE_DEVICES all
7
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
7
8
8
9
RUN apt-get update \
9
10
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates libva-dev \
@@ -18,6 +19,10 @@ RUN SKIPINSTALL=yes /app/build-ffmpeg --build
18
19
19
20
FROM ubuntu:${VER}
20
21
22
+ ENV DEBIAN_FRONTEND noninteractive
23
+ ENV NVIDIA_VISIBLE_DEVICES all
24
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
25
+
21
26
# install va-driver
22
27
RUN apt-get update \
23
28
&& apt-get -y install libva-drm2 \
Original file line number Diff line number Diff line change
1
+ ARG DIST=ubuntu
2
+
1
3
FROM scratch
2
4
3
5
# Copy libnpp
4
- COPY --from=ffmpeg:cuda /lib/x86_64-linux-gnu/libnppc.so.11 /lib/libnppc.so.11
5
- COPY --from=ffmpeg:cuda /lib/x86_64-linux-gnu/libnppig.so.11 /lib/libnppig.so.11
6
- COPY --from=ffmpeg:cuda /lib/x86_64-linux-gnu/libnppicc.so.11 /lib/libnppicc.so.11
7
- COPY --from=ffmpeg:cuda /lib/x86_64-linux-gnu/libnppidei.so.11 /lib/libnppidei.so.11
6
+ COPY --from=ffmpeg:cuda-${DIST} /lib/x86_64-linux-gnu/libnppc.so.11 /lib/libnppc.so.11
7
+ COPY --from=ffmpeg:cuda-${DIST} /lib/x86_64-linux-gnu/libnppig.so.11 /lib/libnppig.so.11
8
+ COPY --from=ffmpeg:cuda-${DIST} /lib/x86_64-linux-gnu/libnppicc.so.11 /lib/libnppicc.so.11
9
+ COPY --from=ffmpeg:cuda-${DIST} /lib/x86_64-linux-gnu/libnppidei.so.11 /lib/libnppidei.so.11
8
10
9
11
# Copy ffmpeg
10
- COPY --from=ffmpeg:cuda /usr/bin/ffmpeg /bin/ffmpeg
11
- COPY --from=ffmpeg:cuda /usr/bin/ffprobe /bin/ffprobe
12
+ COPY --from=ffmpeg:cuda-${DIST} /usr/bin/ffmpeg /bin/ffmpeg
13
+ COPY --from=ffmpeg:cuda-${DIST} /usr/bin/ffprobe /bin/ffprobe
Original file line number Diff line number Diff line change 1
1
FROM nvidia/cuda:11.1-devel-ubuntu20.04 AS build
2
2
3
3
ENV DEBIAN_FRONTEND noninteractive
4
- ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
4
+ ENV NVIDIA_VISIBLE_DEVICES all
5
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
5
6
6
7
RUN apt-get update \
7
8
&& apt-get -y --no-install-recommends install build-essential curl ca-certificates \
@@ -18,6 +19,9 @@ RUN ldd /app/workspace/bin/ffprobe ; exit 0
18
19
19
20
FROM scratch
20
21
22
+ ENV NVIDIA_VISIBLE_DEVICES all
23
+ ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
24
+
21
25
COPY --from=build /app/workspace/bin/ffmpeg /ffmpeg
22
26
COPY --from=build /app/workspace/bin/ffprobe /ffprobe
23
27
You can’t perform that action at this time.
0 commit comments