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 Jun 23, 2021
1 parent 2d543fb commit 99fffa9
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

...
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.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/

0 comments on commit 99fffa9

Please sign in to comment.