feat: Install GPU drivers

feat: Install GPU drivers
This commit is contained in:
Kroese 2023-10-09 03:33:37 +02:00 committed by GitHub
commit 38148641c0
4 changed files with 35 additions and 32 deletions

View File

@ -12,7 +12,6 @@ on:
- '.dockerignore'
- '.github/**'
- '.github/workflows/**'
- 'Dockerfile'
jobs:
shellcheck:

View File

@ -12,29 +12,26 @@ FROM debian:bookworm-slim
ARG DEBCONF_NOWARNINGS="yes"
ARG DEBIAN_FRONTEND noninteractive
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
ADD_PKG="xserver-xorg-video-intel"; fi && \
apt-get update && apt-get -y upgrade && \
RUN apt-get update && apt-get -y upgrade && \
apt-get --no-install-recommends -y install \
curl \
cpio \
wget \
fdisk \
unzip \
socat \
procps \
xz-utils \
iptables \
iproute2 \
dnsmasq \
net-tools \
ca-certificates \
netcat-openbsd \
qemu-system-x86 \
${ADD_PKG} \
curl \
cpio \
wget \
fdisk \
unzip \
socat \
procps \
xz-utils \
iptables \
iproute2 \
dnsmasq \
net-tools \
ca-certificates \
netcat-openbsd \
qemu-system-x86 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY run/*.sh /run/
COPY agent/*.sh /agent/
@ -46,7 +43,7 @@ VOLUME /storage
EXPOSE 22
EXPOSE 80
EXPOSE 139
EXPOSE 139
EXPOSE 445
EXPOSE 5000

View File

@ -102,7 +102,7 @@ if [ -f "${RDC}" ]; then
cp "$TMP/usr/lib/libc.so.6" /lib64/
cp "$TMP/usr/lib/libpthread.so.0" /lib64/
cp "$TMP/usr/lib/ld-linux-x86-64.so.2" /lib64/
fi
fi
mv /run/extract/scemd /run/extract/syno_extract_system_patch
chmod +x /run/extract/syno_extract_system_patch
@ -127,28 +127,36 @@ if ((SIZE<250000000)); then
error "The specified PAT file is probably an update pack as it's too small." && exit 62
fi
info "Install: Extracting downloaded image..."
if { tar tf "$PAT"; } >/dev/null 2>&1; then
info "Install: Extracting downloaded image..."
tar xpf "$PAT" -C "$TMP/."
else
export DEBCONF_NOWARNINGS="yes"
export DEBIAN_FRONTEND="noninteractive"
if [ "$ARCH" != "amd64" ]; then
export DEBCONF_NOWARNINGS="yes"
export DEBIAN_FRONTEND="noninteractive"
info "Install: Installing QEMU..."
apt-get -qq update
apt-get -qq -y upgrade
apt-get -qq update && apt-get -qq -y upgrade
apt-get -qq --no-install-recommends -y install qemu-user > /dev/null
export DEBIAN_FRONTEND=""
export DEBCONF_NOWARNINGS=""
fi
if [[ "${GPU}" == [Yy1]* ]] && [[ "$ARCH" == "amd64" ]]; then
info "Install: Installing GPU drivers..."
apt-get -qq update && apt-get -qq -y upgrade
apt-get -qq --no-install-recommends -y install xserver-xorg-video-intel > /dev/null
fi
info "Install: Extracting downloaded image..."
export LD_LIBRARY_PATH="/run/extract"
if [ "$ARCH" == "amd64" ]; then

View File

@ -146,7 +146,6 @@ configureNAT () {
ip link set dev "${VM_NET_TAP}" master dockerbridge
# Add internet connection to the VM
IP=$(ip address show dev "${VM_NET_DEV}" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)