Merge pull request #298 from linuxserver/tonemap
Install opencl drivers from official Intel repo
This commit is contained in:
commit
2120f253db
4 changed files with 19 additions and 32 deletions
17
Dockerfile
17
Dockerfile
|
|
@ -22,26 +22,17 @@ PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
|
||||||
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
echo "**** add Intel repo ****" && \
|
||||||
|
curl -sL https://repositories.intel.com/graphics/intel-graphics.key | apt-key add - && \
|
||||||
|
echo 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' > /etc/apt/sources.list.d/intel.list && \
|
||||||
echo "**** install runtime packages ****" && \
|
echo "**** install runtime packages ****" && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
beignet-opencl-icd \
|
|
||||||
jq \
|
jq \
|
||||||
ocl-icd-libopencl1 \
|
intel-opencl-icd \
|
||||||
udev \
|
udev \
|
||||||
unrar \
|
unrar \
|
||||||
wget && \
|
wget && \
|
||||||
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name') && \
|
|
||||||
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | sed 's|wget ||g') && \
|
|
||||||
mkdir -p /opencl-intel && \
|
|
||||||
for i in ${COMP_RT_URLS}; do \
|
|
||||||
i=$(echo ${i} | tr -d '\r'); \
|
|
||||||
echo "**** downloading ${i} ****"; \
|
|
||||||
curl -o "/opencl-intel/$(basename ${i})" \
|
|
||||||
-L "${i}"; \
|
|
||||||
done && \
|
|
||||||
dpkg -i /opencl-intel/*.deb && \
|
|
||||||
rm -rf /opencl-intel && \
|
|
||||||
echo "**** install plex ****" && \
|
echo "**** install plex ****" && \
|
||||||
if [ -z ${PLEX_RELEASE+x} ]; then \
|
if [ -z ${PLEX_RELEASE+x} ]; then \
|
||||||
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
|
PLEX_RELEASE=$(curl -sX GET 'https://plex.tv/api/downloads/5.json' \
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||||
|
|
||||||
## Versions
|
## Versions
|
||||||
|
|
||||||
|
* **25.12.21:** - Install Intel drivers from the official repo.
|
||||||
* **20.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information.
|
* **20.01.21:** - Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information.
|
||||||
* **10.12.20:** - Add latest Intel Compute packages from github repo for opencl support on latest gen igpu.
|
* **10.12.20:** - Add latest Intel Compute packages from github repo for opencl support on latest gen igpu.
|
||||||
* **23.11.20:** - Add Bionic branch make Focal default.
|
* **23.11.20:** - Add Bionic branch make Focal default.
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ app_setup_block: |
|
||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
changelogs:
|
||||||
|
- { date: "25.12.21:", desc: "Install Intel drivers from the official repo." }
|
||||||
- { date: "20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." }
|
- { date: "20.01.21:", desc: "Deprecate `UMASK_SET` in favor of UMASK in baseimage, see above for more information." }
|
||||||
- { date: "10.12.20:", desc: "Add latest Intel Compute packages from github repo for opencl support on latest gen igpu." }
|
- { date: "10.12.20:", desc: "Add latest Intel Compute packages from github repo for opencl support on latest gen igpu." }
|
||||||
- { date: "23.11.20:", desc: "Add Bionic branch make Focal default." }
|
- { date: "23.11.20:", desc: "Add Bionic branch make Focal default." }
|
||||||
|
|
|
||||||
|
|
@ -4,23 +4,17 @@ FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null)
|
||||||
|
|
||||||
for i in $FILES
|
for i in $FILES
|
||||||
do
|
do
|
||||||
VIDEO_GID=$(stat -c '%g' "$i")
|
VIDEO_GID=$(stat -c '%g' "$i")
|
||||||
if id -G abc | grep -qw "$VIDEO_GID"; then
|
if ! id -G abc | grep -qw "$VIDEO_GID"; then
|
||||||
touch /groupadd
|
VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}')
|
||||||
else
|
if [ -z "${VIDEO_NAME}" ]; then
|
||||||
if [ ! "${VIDEO_GID}" == '0' ]; then
|
VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)"
|
||||||
VIDEO_NAME=$(getent group "${VIDEO_GID}" | awk -F: '{print $1}')
|
groupadd "$VIDEO_NAME"
|
||||||
if [ -z "${VIDEO_NAME}" ]; then
|
groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
|
||||||
VIDEO_NAME="video$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c8)"
|
fi
|
||||||
groupadd "$VIDEO_NAME"
|
usermod -a -G "$VIDEO_NAME" abc
|
||||||
groupmod -g "$VIDEO_GID" "$VIDEO_NAME"
|
if [ $(stat -c '%A' "${i}" | cut -b 5,6) != "rw" ]; then
|
||||||
fi
|
echo -e "**** The device ${i} does not have group read/write permissions, which might prevent hardware transcode from functioning correctly. To fix it, you can run the following on your docker host: ****\nsudo chmod g+rw ${i}\n"
|
||||||
usermod -a -G "$VIDEO_NAME" abc
|
fi
|
||||||
touch /groupadd
|
fi
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then
|
|
||||||
usermod -a -G root abc
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue