Merge pull request #1 from skjnldsv/feat/update

This commit is contained in:
John Molakvoæ 2022-05-27 16:47:12 +02:00 committed by GitHub
commit 4c56be0e91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,93 @@
from ghcr.io/linuxserver/plex:latest ARG OUTPUT=/output
FROM alpine:edge AS builder
RUN apk add --no-cache \
autoconf \
automake \
binutils \
cmake \
curl \
dpkg \
file \
gcc \
g++ \
libc6-compat \
git \
libtool \
linux-headers \
make \
musl-dev \
nghttp2-dev \
pkgconfig \
xxd
RUN \ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo "**** install runtime packages ****" && \ FROM builder AS amd
apt-get update && \
apt-get install -y software-properties-common && \ ARG CFLAGS
add-apt-repository ppa:oibaf/graphics-drivers -y && \ ARG LDFLAGS
apt-get update && \ ARG MAKEFLAGS
apt-get install -y \ ARG OUTPUT
ARG DESTDIR
WORKDIR /tmp/amd
RUN apk add xf86-video-amdgpu linux-firmware-amdgpu --no-cache --update-cache \
&& apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing libva-utils \
&& mkdir -p "$OUTPUT/usr/bin" \
&& cp -a /usr/bin/vainfo "$OUTPUT/usr/bin" \
&& mkdir -p "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libX*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libwayland*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libva*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libdrm*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libbsd*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libxshmfence*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libkms*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libxcb*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libffi*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libLLVM*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libzstd*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libexpat*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libelf*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libstdc++*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libgcc_s*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libmd*.so* "$OUTPUT/usr/lib" \
&& cp -a /usr/lib/libxml2*.so* "$OUTPUT/usr/lib" \
&& mkdir -p "$OUTPUT/usr/lib/dri" \
&& cp -a /usr/lib/dri/*.so* "$OUTPUT/usr/lib/dri" \
&& mkdir -p "$OUTPUT/usr/share/libdrm" \
&& cp -a /usr/share/libdrm/* "$OUTPUT/usr/share/libdrm" \
&& cp -a /lib/ld-musl-x86_64.so.1 "$OUTPUT/usr/lib" \
&& cp -a /lib/libz*.so* "$OUTPUT/usr/lib"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from ghcr.io/linuxserver/plex:latest
ARG OUTPUT
# Install AMD drivers
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:oibaf/graphics-drivers -y \
&& apt-get update \
&& apt-get install -y \
vainfo \ vainfo \
mesa-va-drivers \ mesa-va-drivers \
mesa-vdpau-drivers \ mesa-vdpau-drivers \
libdrm-amdgpu1 \ libdrm-amdgpu1 \
libavutil56 && \ libavutil56 \
apt-get clean && apt-get clean
RUN cp /lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so /usr/lib/plexmediaserver/lib/dri/ # Copy lib files
RUN cp /lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.* /usr/lib/plexmediaserver/lib/libdrm_amdgpu.so.1 COPY --from=amd $OUTPUT/usr/lib/dri/*.so* /usr/lib/plexmediaserver/lib/dri/
RUN cp /lib/x86_64-linux-gnu/libdrm.so.2.* /usr/lib/plexmediaserver/lib/libdrm.so.2 COPY --from=amd $OUTPUT/usr/lib/ld-musl-x86_64.so* /usr/lib/plexmediaserver/lib/
RUN cp /lib/x86_64-linux-gnu/libva-drm.so.2.* /usr/lib/plexmediaserver/lib/libva-drm.so.2 COPY --from=amd $OUTPUT/usr/lib/libdrm*.so* /usr/lib/plexmediaserver/lib/
RUN cp /lib/x86_64-linux-gnu/libva.so.2.* /usr/lib/plexmediaserver/lib/libva.so.2 COPY --from=amd $OUTPUT/usr/lib/libelf*.so* /usr/lib/plexmediaserver/lib/
RUN cp /lib/x86_64-linux-gnu/libstdc++.so.6.* /usr/lib/plexmediaserver/lib/libstdc++.so.6 COPY --from=amd $OUTPUT/usr/lib/libffi*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libgcc_s*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libkms*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libLLVM*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libstdc++*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libva*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libxml2*.so* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libz*.so.* /usr/lib/plexmediaserver/lib/
COPY --from=amd $OUTPUT/usr/lib/libzstd*.so* /usr/lib/plexmediaserver/lib/