Commit 38148641 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Install GPU drivers

feat: Install GPU drivers
parents 16b823f6 5941eae2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ on:
      - '.dockerignore'
      - '.github/**'
      - '.github/workflows/**'
      - 'Dockerfile'

jobs:
  shellcheck:
+18 −21
Original line number Diff line number Diff line
@@ -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/*

+17 −9
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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/)