Skip to content

Commit 87ba41d

Browse files
authored
Merge pull request #245 from linuxserver/jellyfin-opencl-intel-apt
standardize apt-get, rebase to 3.14
2 parents 56b6770 + 8177376 commit 87ba41d

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

Dockerfile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
## Buildstage ##
2-
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
2+
FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as buildstage
33

44
ARG COMP_RT_RELEASE
55

66
RUN \
7-
echo "**** install packages ****" && \
8-
apk add --no-cache \
7+
echo "**** install packages ****" && \
8+
apk add --no-cache \
99
curl \
1010
jq && \
11-
if [ -z "${COMP_RT_RELEASE}" ]; then \
11+
if [ -z "${COMP_RT_RELEASE}" ]; then \
1212
COMP_RT_RELEASE=$(curl -sX GET "https://api.github.com/repos/intel/compute-runtime/releases/latest" | jq -r '.tag_name'); \
13-
fi && \
14-
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') && \
15-
echo "**** grab debs ****" && \
16-
mkdir -p /root-layer/opencl-intel && \
17-
for i in $COMP_RT_URLS; do \
13+
fi && \
14+
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') && \
15+
echo "**** grab debs ****" && \
16+
mkdir -p /root-layer/opencl-intel && \
17+
for i in $COMP_RT_URLS; do \
1818
echo "**** downloading ${i%$'\r'} ****" && \
1919
curl -o /root-layer/opencl-intel/$(basename "${i%$'\r'}") \
20-
-L "${i%$'\r'}"; \
21-
done
20+
-L "${i%$'\r'}"; \
21+
done
2222

2323
# copy local files
2424
COPY root/ /root-layer/

root/etc/cont-init.d/95-apt-get

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
apt-get update

root/etc/cont-init.d/98-opencl-intel

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22

33
# Determine if setup is needed
44
if [ ! -f "/usr/bin/apt" ]; then
5-
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
6-
exit 0
5+
echo "**** Image is not Ubuntu, skipping opencl-intel install ****"
6+
exit 0
77
fi
88

99
if [ $(uname -m) != "x86_64" ]; then
10-
echo "**** Opencl-intel only works on X86_64, skipping ****"
11-
exit 0
10+
echo "**** Opencl-intel only works on X86_64, skipping ****"
11+
exit 0
1212
fi
1313

1414
echo "**** Installing clinfo ****"
15-
apt-get update
1615
apt-get install -y \
17-
clinfo
16+
clinfo
1817

1918
if [ -d /opencl-intel ]; then
20-
echo "**** Installing/updating opencl-intel debs ****"
21-
dpkg -i /opencl-intel/*.deb
22-
rm -rf /opencl-intel
19+
echo "**** Installing/updating opencl-intel debs ****"
20+
dpkg -i /opencl-intel/*.deb
21+
rm -rf /opencl-intel
2322
else
24-
echo "**** Opencl-intel already installed ****"
23+
echo "**** Opencl-intel already installed ****"
2524
fi

0 commit comments

Comments
 (0)