2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2024-11-12 12:16:22 +00:00
plex-media-server/Dockerfile.nvidia
Joe Groocock a2110c9ecc
Add nvidia libraries into :nvidia image
Pull the nvidia encoding and decoding libraries from Debian and include
them in the image.

This change is only a test and doesn't build the base Plex image first,
which the CI pipeline should do when this is merged into pass.

Fixes #34

Signed-off-by: Joe Groocock <me@frebib.net>
2021-06-23 15:01:08 +00:00

28 lines
745 B
Docker

ARG PLEX_VER=1.23.4.4712
ARG NVIDIA_VER=465.31
ARG NVIDIA_REV=1
ARG ARCH=amd64
FROM alpine
ARG NVIDIA_VER
ARG NVIDIA_REV
ARG ARCH
RUN apk add --no-cache curl dpkg && \
for pkg in libnvcuvid1 libnvidia-encode1; do \
curl -fsSLO https://deb.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/${pkg}_${NVIDIA_VER}-${NVIDIA_REV}_${ARCH}.deb && \
dpkg-deb -x ${pkg}_${NVIDIA_VER}-${NVIDIA_REV}_${ARCH}.deb /nvidia; \
done
# ~~~~~~~~~~~~~~~~~~
FROM spritsail/plex-media-server:plexpass-${PLEX_VER}
ARG NVIDIA_VER
COPY --from=0 \
/nvidia/usr/lib/x86_64-linux-gnu/nvidia/current/libnvcuvid.so.${NVIDIA_VER} \
/nvidia/usr/lib/x86_64-linux-gnu/nvidia/current/libnvidia-encode.so.${NVIDIA_VER} \
/usr/lib/