From 3798ee8f5425a2d2226c56263ce826786f454400 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Wed, 19 May 2021 20:29:13 +0100 Subject: [PATCH] Add nvidia libraries into :nvidia image Pull the nvidia encoding and decoding libraries from Debian and include them in the image. Fixes #34 Signed-off-by: Joe Groocock --- .drone.yml | 37 ++++++++++++++++++++++++++++++++++++- Dockerfile.nvidia | 27 +++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.nvidia diff --git a/.drone.yml b/.drone.yml index be2d5e7..bfdb86b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -47,8 +47,43 @@ steps: - pass event: - push + +--- +kind: pipeline +name: build-nvidia-amd64 + +platform: + os: linux + arch: amd64 + +depends_on: +- build-amd64 + +steps: +- name: build + pull: always + image: spritsail/docker-build + settings: + dockerfile: Dockerfile.nvidia + make: true + +- name: publish + pull: always + image: spritsail/docker-publish + settings: + repo: spritsail/plex-media-server + tags: + - plexpass-nvidia + - "%label io.spritsail.version.plex | %prefix plexpass-nvidia | %remsuf [0-9a-f]+$ | %auto 2" + login: {from_secret: docker_login} + when: + branch: + - nvidia + event: + - push + --- kind: signature -hmac: a6e529b62ed2ecf24b2c3125f7267c321d56ce16d1cd8178f96e0399dd3096bd +hmac: d763454a306fca2c1526a2b8817c58b304e963d86071ea77e89fb8bb48659b09 ... diff --git a/Dockerfile.nvidia b/Dockerfile.nvidia new file mode 100644 index 0000000..4b6b6fa --- /dev/null +++ b/Dockerfile.nvidia @@ -0,0 +1,27 @@ +ARG PLEX_VER=1.23.1.4528 +ARG NVIDIA_VER=460.73.01 +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/