From 64ad9f8febe39329e9761bcb3caa08f80264e501 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sun, 11 Apr 2021 10:37:57 +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 | 41 ++++++++++++++++++++++++++++++++++++----- Dockerfile.nvidia | 27 +++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 Dockerfile.nvidia diff --git a/.drone.yml b/.drone.yml index abdb25f..e47b8f4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -46,16 +46,47 @@ steps: tags: - plexpass - "%label io.spritsail.version.plex | %prefix plexpass | %remsuf [0-9a-f]+$ | %auto 2" - username: - from_secret: docker_username - password: - from_secret: docker_password + login: {from_secret: docker_login} when: branch: - 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: pipeline name: update-cron @@ -86,6 +117,6 @@ steps: --- kind: signature -hmac: 21c718e301b4ad099b8a7c6cd9f0021e5fd86fcbd3ba14a16184a40eca155fd0 +hmac: d8260a5bb56f93a36e770acb76bb4ddc056ade8fdcfc748ec5724e01450d1f40 ... diff --git a/Dockerfile.nvidia b/Dockerfile.nvidia new file mode 100644 index 0000000..ef9d224 --- /dev/null +++ b/Dockerfile.nvidia @@ -0,0 +1,27 @@ +ARG PLEX_VER=1.22.2.4282 +ARG NVIDIA_VER=460.67 +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/