forked from plexinc/pms-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
74 lines (65 loc) · 2.34 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
FROM ubuntu:20.04
ARG S6_OVERLAY_VERSION=v2.2.0.3
ARG S6_OVERLAY_ARCH=amd64
ARG PLEX_BUILD=linux-x86_64
ARG PLEX_DISTRO=debian
ARG DEBIAN_FRONTEND="noninteractive"
ARG INTEL_NEO_VERSION=20.48.18558
ARG INTEL_IGC_VERSION=1.0.5699
ARG INTEL_GMMLIB_VERSION=20.3.2
ENV TERM="xterm" LANG="C.UTF-8" LC_ALL="C.UTF-8"
ENTRYPOINT ["/init"]
RUN \
# Update and get dependencies
apt-get update && \
apt-get install -y \
tzdata \
curl \
xmlstarlet \
uuid-runtime \
unrar \
beignet-opencl-icd \
ocl-icd-libopencl1 \
&& \
\
# Fetch and extract S6 overlay
curl -J -L -o /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz && \
tar xzf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz -C / --exclude='./bin' && \
tar xzf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.gz -C /usr ./bin && \
\
# Fetch and install Intel Compute Runtime and its deps
curl -J -L -o /tmp/gmmlib.deb https://github.com/intel/compute-runtime/releases/download/${INTEL_NEO_VERSION}/intel-gmmlib_${INTEL_GMMLIB_VERSION}_amd64.deb && \
apt install -y /tmp/gmmlib.deb && \
curl -J -L -o /tmp/#1.deb https://github.com/intel/intel-graphics-compiler/releases/download/igc-${INTEL_IGC_VERSION}/{intel-igc-core,intel-igc-opencl}_${INTEL_IGC_VERSION}_amd64.deb && \
apt install -y /tmp/intel-igc-core.deb /tmp/intel-igc-opencl.deb && \
curl -J -L -o /tmp/intel-opencl.deb https://github.com/intel/compute-runtime/releases/download/${INTEL_NEO_VERSION}/intel-opencl_${INTEL_NEO_VERSION}_amd64.deb && \
apt install -y /tmp/intel-opencl.deb && \
\
# Add user
useradd -U -d /config -s /bin/false plex && \
usermod -G users plex && \
\
# Setup directories
mkdir -p \
/config \
/transcode \
/data \
&& \
\
# Cleanup
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
rm -rf /var/tmp/*
EXPOSE 32400/tcp 8324/tcp 32469/tcp 1900/udp 32410/udp 32412/udp 32413/udp 32414/udp
VOLUME /config /transcode
ENV CHANGE_CONFIG_DIR_OWNERSHIP="true" \
HOME="/config"
ARG TAG=beta
ARG URL=
COPY root/ /
RUN \
# Save version and install
/installBinary.sh
HEALTHCHECK --interval=5s --timeout=2s --retries=20 CMD /healthcheck.sh || exit 1