2
0
mirror of https://github.com/spritsail/plex-media-server.git synced 2024-12-20 11:34:36 +00:00

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>
This commit is contained in:
Joe Groocock 2021-06-23 16:01:08 +01:00
parent 2d543fb511
commit a2110c9ecc
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 37 additions and 25 deletions

View File

@ -1,54 +1,39 @@
---
kind: pipeline
name: build-amd64
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: test-bin
pull: always
image: spritsail/docker-test
settings:
run: |
busybox && \
curl --version && \
xmlstarlet --version
- name: test
pull: always
image: spritsail/docker-test
settings:
curl: :32400/identity
delay: 5
pipe: |
xmlstarlet sel -t -v "/MediaContainer/@version" |
grep -qw "$(label io.spritsail.version.plex | cut -d- -f1)"
retry: 10
- name: publish
pull: always
image: spritsail/docker-publish
settings:
repo: spritsail/plex-media-server
tags:
- plexpass
- "%label io.spritsail.version.plex | %prefix plexpass | %remsuf [0-9a-f]+$ | %auto 2"
- plexpass-nvidia
- "%label io.spritsail.version.plex | %prefix plexpass-nvidia | %remsuf [0-9a-f]+$ | %auto 2"
login: {from_secret: docker_login}
when:
branch:
- pass
- nvidia
event:
- push
---
kind: signature
hmac: a6e529b62ed2ecf24b2c3125f7267c321d56ce16d1cd8178f96e0399dd3096bd
hmac: d7799de75f1932b1aa3757273cad30c30d56442175e1ca2714720b252f6d7398
...

27
Dockerfile.nvidia Normal file
View File

@ -0,0 +1,27 @@
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/