mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-03-23 00:05:28 +08:00
Merge pull request #245 from linuxserver/jellyfin-opencl-intel-apt
standardize apt-get, rebase to 3.14
This commit is contained in:
commit
87ba41d325
22
Dockerfile
22
Dockerfile
@ -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/
|
||||
|
||||
3
root/etc/cont-init.d/95-apt-get
Normal file
3
root/etc/cont-init.d/95-apt-get
Normal file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
apt-get update
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user