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,9 +12,7 @@ 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 \
@ -31,7 +29,6 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
ca-certificates \
netcat-openbsd \
qemu-system-x86 \
${ADD_PKG} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -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
if [ "$ARCH" != "amd64" ]; then
export DEBCONF_NOWARNINGS="yes"
export DEBIAN_FRONTEND="noninteractive"
apt-get -qq update
apt-get -qq -y upgrade
if [ "$ARCH" != "amd64" ]; then
info "Install: Installing QEMU..."
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/)