forked from markus-perl/ffmpeg-build-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcuda-centos.dockerfile
49 lines (36 loc) · 1.6 KB
/
cuda-centos.dockerfile
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
ARG VER=8
FROM nvidia/cuda:11.4.2-devel-centos${VER} AS build
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
RUN yum group install -y "Development Tools" \
&& yum install -y curl libva-devel python3 \
&& yum install -y meson ninja-build --enablerepo=powertools \
&& rm -rf /var/cache/yum/* /var/cache/dnf/* \
&& yum clean all \
&& alternatives --set python /usr/bin/python3
WORKDIR /app
COPY ./build-ffmpeg /app/build-ffmpeg
RUN SKIPINSTALL=yes /app/build-ffmpeg --build --enable-gpl-and-non-free
FROM centos:${VER}
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,video
# install va-driver
RUN yum install -y libva \
&& rm -rf /var/cache/yum/* \
&& yum clean all
# Copy libnpp
COPY --from=build /usr/local/cuda-11.4/targets/x86_64-linux/lib/libnppc.so.11 /lib64/libnppc.so.11
COPY --from=build /usr/local/cuda-11.4/targets/x86_64-linux/lib/libnppig.so.11 /lib64/libnppig.so.11
COPY --from=build /usr/local/cuda-11.4/targets/x86_64-linux/lib/libnppicc.so.11 /lib64/libnppicc.so.11
COPY --from=build /usr/local/cuda-11.4/targets/x86_64-linux/lib/libnppidei.so.11 /lib64/libnppidei.so.11
COPY --from=build /usr/local/cuda-11.4/targets/x86_64-linux/lib/libnppif.so.11 /lib64/libnppif.so.11
# Copy ffmpeg
COPY --from=build /app/workspace/bin/ffmpeg /usr/bin/ffmpeg
COPY --from=build /app/workspace/bin/ffprobe /usr/bin/ffprobe
COPY --from=build /app/workspace/bin/ffplay /usr/bin/ffplay
# Check shared library
RUN ldd /usr/bin/ffmpeg
RUN ldd /usr/bin/ffprobe
RUN ldd /usr/bin/ffplay
CMD ["--help"]
ENTRYPOINT ["/usr/bin/ffmpeg"]