Merge pull request #319 from linuxserver/opencl-pin
pin all opencl related driver packages
This commit is contained in:
commit
f5eda16a6a
9 changed files with 224 additions and 224 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -12,14 +12,14 @@ ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
|
|||
|
||||
# global environment settings
|
||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="amd64" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="amd64" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
|
||||
RUN \
|
||||
echo "**** add Intel repo ****" && \
|
||||
|
|
@ -29,7 +29,11 @@ RUN \
|
|||
apt-get update && \
|
||||
apt-get install -y \
|
||||
jq \
|
||||
intel-igc-cm=1.0.128+i699.3~u20.04 \
|
||||
intel-opencl-icd=21.49.21786+i643~u20.04 \
|
||||
libigc1=1.0.10409+i699.3~u20.04 \
|
||||
libigdfcl1=1.0.10409+i699.3~u20.04 \
|
||||
libigdgmm11=21.3.3+i643~u20.04 \
|
||||
udev \
|
||||
unrar \
|
||||
wget && \
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ LABEL maintainer="thelamer"
|
|||
|
||||
# global environment settings
|
||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="arm64" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="arm64" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ LABEL maintainer="thelamer"
|
|||
|
||||
# global environment settings
|
||||
ENV DEBIAN_FRONTEND="noninteractive" \
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="armhf" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server-new" \
|
||||
PLEX_ARCH="armhf" \
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
|
||||
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
|
||||
PLEX_MEDIA_SERVER_USER="abc" \
|
||||
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||
|
||||
RUN \
|
||||
echo "**** install runtime packages ****" && \
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||
|
||||
## Versions
|
||||
|
||||
* **18.07.22:** - Pin all opencl related driver packages.
|
||||
* **16.05.22:** - Pin opencl version.
|
||||
* **04.03.22:** - Increase verbosity of video device permissions fix, attempt to fix missing group rw.
|
||||
* **25.12.21:** - Install Intel drivers from the official repo.
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ app_setup_block: |
|
|||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "18.07.22:", desc: "Pin all opencl related driver packages." }
|
||||
- { date: "16.05.22:", desc: "Pin opencl version." }
|
||||
- { date: "04.03.22:", desc: "Increase verbosity of video device permissions fix, attempt to fix missing group rw." }
|
||||
- { date: "25.12.21:", desc: "Install Intel drivers from the official repo." }
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# create folders
|
||||
if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]; then \
|
||||
mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
|
||||
chown -R abc:abc /config
|
||||
mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
|
||||
chown -R abc:abc /config
|
||||
fi
|
||||
|
||||
# check Library permissions
|
||||
|
|
@ -17,7 +17,7 @@ fi
|
|||
|
||||
# remove plex pid after unclean stop
|
||||
[[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" ]] && \
|
||||
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
|
||||
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
|
||||
|
||||
# permissions (non-recursive) on config root and folders
|
||||
chown abc:abc \
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ fi
|
|||
|
||||
# test if plex is installed and try re-pulling latest if not
|
||||
if (dpkg --get-selections plexmediaserver | grep -wq "install"); then
|
||||
:
|
||||
:
|
||||
else
|
||||
echo "for some reason plex doesn't appear to be installed, pulling a new copy and exiting out of update script"
|
||||
curl -o /tmp/plexmediaserver.deb -L \
|
||||
echo "for some reason plex doesn't appear to be installed, pulling a new copy and exiting out of update script"
|
||||
curl -o /tmp/plexmediaserver.deb -L \
|
||||
"${PLEX_DOWNLOAD}/${REMOTE_VERSION}/debian/plexmediaserver_${REMOTE_VERSION}_${PLEX_ARCH}.deb" && \
|
||||
dpkg -i --force-confold /tmp/plexmediaserver.deb
|
||||
rm -f /tmp/plexmediaserver.deb
|
||||
exit 0
|
||||
dpkg -i --force-confold /tmp/plexmediaserver.deb
|
||||
rm -f /tmp/plexmediaserver.deb
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# set no update message
|
||||
|
|
@ -47,8 +47,8 @@ EOFFAIL
|
|||
|
||||
# test for no version set or opt out for autoupdates
|
||||
if [[ -z "$VERSION" ]] || [[ "$VERSION" == "0" ]] || [[ -n "$ADVANCED_DISABLEUPDATES" ]]; then
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-version.nfo)"
|
||||
exit 0
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-version.nfo)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# set header for no preferences/token message
|
||||
|
|
@ -63,12 +63,12 @@ EOFTOKEN
|
|||
|
||||
# if preferences files doesn't exist, exit out
|
||||
if [ ! -e "/config/Library/Application Support/Plex Media Server/Preferences.xml" ]; then
|
||||
cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
||||
cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
||||
# preference file found, possibly first startup. #
|
||||
#####################################################
|
||||
EOFTOKEN
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
||||
exit 0
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# attempt to read plex token
|
||||
|
|
@ -78,12 +78,12 @@ PLEX_TOKEN=$( sed -n 's/.*PlexOnlineToken="//p' \
|
|||
|
||||
# if plex token isn't found, exit out
|
||||
if [ -z "$PLEX_TOKEN" ]; then
|
||||
cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
||||
cat >> "${NOTOKEN_SET}" <<-EOFTOKEN
|
||||
# plex token found in the preference file #
|
||||
#####################################################
|
||||
EOFTOKEN
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
||||
exit 0
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/no-token.nfo)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# determine installed version of plex
|
||||
|
|
@ -98,30 +98,30 @@ if [[ "${VERSION,,}" = latest ]] || [[ "${VERSION,,}" = plexpass ]] || [[ "$PLEX
|
|||
elif [[ "${PLEX_ARCH}" = arm64 ]]; then
|
||||
PLEX_URL_ARCH="aarch64"
|
||||
fi
|
||||
REMOTE_VERSION=$(curl -s "https://plex.tv/downloads/details/5?distro=debian&build=linux-${PLEX_URL_ARCH}&channel=8&X-Plex-Token=$PLEX_TOKEN"| grep -oP 'version="\K[^"]+' | tail -n 1 )
|
||||
REMOTE_VERSION=$(curl -s "https://plex.tv/downloads/details/5?distro=debian&build=linux-${PLEX_URL_ARCH}&channel=8&X-Plex-Token=$PLEX_TOKEN"| grep -oP 'version="\K[^"]+' | tail -n 1 )
|
||||
elif [[ "${VERSION,,}" = public ]]; then
|
||||
REMOTE_VERSION=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' | jq -r '.computer.Linux.version')
|
||||
REMOTE_VERSION=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' | jq -r '.computer.Linux.version')
|
||||
else
|
||||
REMOTE_VERSION="${VERSION}"
|
||||
REMOTE_VERSION="${VERSION}"
|
||||
fi
|
||||
|
||||
if [[ "$REMOTE_VERSION" == "$INSTALLED_VERSION" ]]; then
|
||||
echo "No update required"
|
||||
exit 0
|
||||
echo "No update required"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Atempting to upgrade to: $REMOTE_VERSION"
|
||||
rm -f /tmp/plexmediaserver_*.deb
|
||||
wget -nv -P /tmp \
|
||||
"${PLEX_DOWNLOAD}/${REMOTE_VERSION}/debian/plexmediaserver_${REMOTE_VERSION}_${PLEX_ARCH}.deb"
|
||||
"${PLEX_DOWNLOAD}/${REMOTE_VERSION}/debian/plexmediaserver_${REMOTE_VERSION}_${PLEX_ARCH}.deb"
|
||||
last=$?
|
||||
|
||||
# test if deb file size is ok, or if download failed
|
||||
if [[ "$last" -gt "0" ]] || [[ $(stat -c %s /tmp/plexmediaserver_"${REMOTE_VERSION}"_${PLEX_ARCH}.deb) -lt 10000 ]]; then
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/update_fail.nfo)"
|
||||
exit 0
|
||||
printf '\n\n\n%s\n\n\n' "$(</tmp/update_fail.nfo)"
|
||||
exit 0
|
||||
# if ok, try to install it.
|
||||
else
|
||||
dpkg -i --force-confold /tmp/plexmediaserver_"${REMOTE_VERSION}"_${PLEX_ARCH}.deb
|
||||
rm -f /tmp/plexmediaserver_*.deb
|
||||
dpkg -i --force-confold /tmp/plexmediaserver_"${REMOTE_VERSION}"_${PLEX_ARCH}.deb
|
||||
rm -f /tmp/plexmediaserver_*.deb
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
|
||||
if [ -n "${UMASK_SET}" ] && [ -z "${UMASK}" ]; then
|
||||
echo -e "You are using a legacy method of defining umask\nplease update your environment variable from UMASK_SET to UMASK\nto keep the functionality after July 2021"
|
||||
umask ${UMASK_SET}
|
||||
fi
|
||||
|
||||
echo "Starting Plex Media Server."
|
||||
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
|
||||
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue