Merge pull request #245 from linuxserver/jellyfin-opencl-intel-apt

standardize apt-get, rebase to 3.14
This commit is contained in:
aptalca 2021-09-21 14:38:49 -04:00 committed by GitHub
commit 87ba41d325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 21 deletions

View File

@ -1,24 +1,24 @@
## Buildstage ##
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as buildstage
ARG COMP_RT_RELEASE
RUN \
echo "**** install packages ****" && \
apk add --no-cache \
echo "**** install packages ****" && \
apk add --no-cache \
curl \
jq && \
if [ -z "${COMP_RT_RELEASE}" ]; then \
if [ -z "${COMP_RT_RELEASE}" ]; then \
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name'); \
fi && \
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | grep -v ww47 | sed 's|wget ||g') && \
echo "**** grab debs ****" && \
mkdir -p /root-layer/opencl-intel && \
for i in $COMP_RT_URLS; do \
fi && \
COMP_RT_URLS=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/tags/${COMP_RT_RELEASE}" | jq -r '.body' | grep wget | grep -v ww47 | sed 's|wget ||g') && \
echo "**** grab debs ****" && \
mkdir -p /root-layer/opencl-intel && \
for i in $COMP_RT_URLS; do \
echo "**** downloading ${i%$'\r'} ****" && \
curl -o /root-layer/opencl-intel/$(basename "${i%$'\r'}") \
-L "${i%$'\r'}"; \
done
-L "${i%$'\r'}"; \
done
# copy local files
COPY root/ /root-layer/

View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
apt-get update

View File

@ -2,24 +2,23 @@
# Determine if setup is needed
if [ ! -f "/usr/bin/apt" ]; then
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
exit 0
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
exit 0
fi
if [ $(uname -m) != "x86_64" ]; then
echo "**** Opencl-intel only works on X86_64, skipping ****"
exit 0
echo "**** Opencl-intel only works on X86_64, skipping ****"
exit 0
fi
echo "**** Installing clinfo ****"
apt-get update
apt-get install -y \
clinfo
clinfo
if [ -d /opencl-intel ]; then
echo "**** Installing/updating opencl-intel debs ****"
dpkg -i /opencl-intel/*.deb
rm -rf /opencl-intel
echo "**** Installing/updating opencl-intel debs ****"
dpkg -i /opencl-intel/*.deb
rm -rf /opencl-intel
else
echo "**** Opencl-intel already installed ****"
echo "**** Opencl-intel already installed ****"
fi