Skip to content

Commit

Permalink
Add nvidia libraries into :nvidia image
Browse files Browse the repository at this point in the history
Pull the nvidia encoding and decoding libraries from Debian and include
them in the image.

Fixes #34

Signed-off-by: Joe Groocock <me@frebib.net>
  • Loading branch information
frebib committed Apr 11, 2021
1 parent a414d3b commit 64ad9f8
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -86,6 +117,6 @@ steps:

---
kind: signature
hmac: 21c718e301b4ad099b8a7c6cd9f0021e5fd86fcbd3ba14a16184a40eca155fd0
hmac: d8260a5bb56f93a36e770acb76bb4ddc056ade8fdcfc748ec5724e01450d1f40

...
27 changes: 27 additions & 0 deletions Dockerfile.nvidia
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit 64ad9f8

Please sign in to comment.