2022-05-27 09:26:35 -05:00
|
|
|
ARG OUTPUT=/output
|
2023-05-09 22:01:43 -05:00
|
|
|
FROM alpine:3.18 AS builder
|
2022-05-27 09:26:35 -05:00
|
|
|
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 \
|
2022-10-07 20:22:38 -05:00
|
|
|
xxd \
|
|
|
|
libbsd
|
2022-05-27 09:26:35 -05:00
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
FROM builder AS amd
|
|
|
|
|
|
|
|
ARG CFLAGS
|
|
|
|
ARG LDFLAGS
|
|
|
|
ARG MAKEFLAGS
|
|
|
|
ARG OUTPUT
|
|
|
|
ARG DESTDIR
|
|
|
|
|
|
|
|
WORKDIR /tmp/amd
|
|
|
|
|
2022-10-07 20:33:01 -05:00
|
|
|
RUN apk add xf86-video-amdgpu linux-firmware-amdgpu --no-cache --update-cache \
|
2022-10-07 19:51:15 -05:00
|
|
|
&& apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing libva-utils \
|
2022-05-27 09:26:35 -05:00
|
|
|
&& 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" \
|
2022-10-07 20:19:49 -05:00
|
|
|
&& cp -a /usr/lib/libxshmfence*.so* "$OUTPUT/usr/lib" \
|
2022-10-07 16:57:06 -05:00
|
|
|
&& cp -a /usr/lib/libkms*.so* "$OUTPUT/usr/lib" \
|
2022-05-27 09:26:35 -05:00
|
|
|
&& cp -a /usr/lib/libxcb*.so* "$OUTPUT/usr/lib" \
|
2022-10-07 20:06:29 -05:00
|
|
|
&& cp -a /usr/lib/libffi*.so* "$OUTPUT/usr/lib" \
|
2022-05-27 09:26:35 -05:00
|
|
|
&& 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" \
|
2022-10-07 16:46:21 -05:00
|
|
|
&& mkdir -p "$OUTPUT/usr/lib/dri" \
|
2022-10-07 20:19:49 -05:00
|
|
|
&& cp -a /usr/lib/dri/*.so* "$OUTPUT/usr/lib/dri" \
|
2022-10-07 20:08:19 -05:00
|
|
|
&& mkdir -p "$OUTPUT/usr/share/libdrm" \
|
2022-05-27 09:26:35 -05:00
|
|
|
&& 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"
|
|
|
|
|
|
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2023-05-08 22:01:03 -05:00
|
|
|
FROM ghcr.io/linuxserver/plex:1.32.1
|
2022-05-27 09:26:35 -05:00
|
|
|
ARG OUTPUT
|
2022-05-27 09:05:36 -05:00
|
|
|
|
2022-10-07 16:35:48 -05:00
|
|
|
# Install AMD drivers for HW decoding
|
2022-05-27 09:26:35 -05:00
|
|
|
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 \
|
2022-05-27 09:05:36 -05:00
|
|
|
vainfo \
|
|
|
|
mesa-va-drivers \
|
|
|
|
mesa-vdpau-drivers \
|
|
|
|
libdrm-amdgpu1 \
|
2022-05-27 09:26:35 -05:00
|
|
|
libavutil56 \
|
|
|
|
&& apt-get clean
|
2022-05-27 09:05:36 -05:00
|
|
|
|
2022-05-27 09:26:35 -05:00
|
|
|
# Copy lib files
|
2022-10-07 20:33:01 -05:00
|
|
|
COPY --from=amd $OUTPUT/usr/lib/dri/*.so* /usr/lib/plexmediaserver/lib/dri/
|
2022-05-27 09:26:35 -05:00
|
|
|
COPY --from=amd $OUTPUT/usr/lib/ld-musl-x86_64.so* /usr/lib/plexmediaserver/lib/
|
|
|
|
COPY --from=amd $OUTPUT/usr/lib/libdrm*.so* /usr/lib/plexmediaserver/lib/
|
|
|
|
COPY --from=amd $OUTPUT/usr/lib/libelf*.so* /usr/lib/plexmediaserver/lib/
|
|
|
|
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/
|