mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
feat: Install GPU drivers
feat: Install GPU drivers
This commit is contained in:
commit
38148641c0
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -12,7 +12,6 @@ on:
|
|||||||
- '.dockerignore'
|
- '.dockerignore'
|
||||||
- '.github/**'
|
- '.github/**'
|
||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
- 'Dockerfile'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shellcheck:
|
shellcheck:
|
||||||
|
@ -12,9 +12,7 @@ FROM debian:bookworm-slim
|
|||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
ARG DEBIAN_FRONTEND noninteractive
|
ARG DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN apt-get update && apt-get -y upgrade && \
|
||||||
ADD_PKG="xserver-xorg-video-intel"; fi && \
|
|
||||||
apt-get update && apt-get -y upgrade && \
|
|
||||||
apt-get --no-install-recommends -y install \
|
apt-get --no-install-recommends -y install \
|
||||||
curl \
|
curl \
|
||||||
cpio \
|
cpio \
|
||||||
@ -31,7 +29,6 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
|||||||
ca-certificates \
|
ca-certificates \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
qemu-system-x86 \
|
qemu-system-x86 \
|
||||||
${ADD_PKG} \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
@ -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
|
error "The specified PAT file is probably an update pack as it's too small." && exit 62
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "Install: Extracting downloaded image..."
|
|
||||||
|
|
||||||
if { tar tf "$PAT"; } >/dev/null 2>&1; then
|
if { tar tf "$PAT"; } >/dev/null 2>&1; then
|
||||||
|
|
||||||
|
info "Install: Extracting downloaded image..."
|
||||||
tar xpf "$PAT" -C "$TMP/."
|
tar xpf "$PAT" -C "$TMP/."
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
if [ "$ARCH" != "amd64" ]; then
|
|
||||||
|
|
||||||
export DEBCONF_NOWARNINGS="yes"
|
export DEBCONF_NOWARNINGS="yes"
|
||||||
export DEBIAN_FRONTEND="noninteractive"
|
export DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
apt-get -qq update
|
if [ "$ARCH" != "amd64" ]; then
|
||||||
apt-get -qq -y upgrade
|
|
||||||
|
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
|
apt-get -qq --no-install-recommends -y install qemu-user > /dev/null
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=""
|
fi
|
||||||
export DEBCONF_NOWARNINGS=""
|
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
|
info "Install: Extracting downloaded image..."
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="/run/extract"
|
export LD_LIBRARY_PATH="/run/extract"
|
||||||
|
|
||||||
if [ "$ARCH" == "amd64" ]; then
|
if [ "$ARCH" == "amd64" ]; then
|
||||||
|
@ -146,7 +146,6 @@ configureNAT () {
|
|||||||
|
|
||||||
ip link set dev "${VM_NET_TAP}" master dockerbridge
|
ip link set dev "${VM_NET_TAP}" master dockerbridge
|
||||||
|
|
||||||
|
|
||||||
# Add internet connection to the VM
|
# Add internet connection to the VM
|
||||||
IP=$(ip address show dev "${VM_NET_DEV}" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)
|
IP=$(ip address show dev "${VM_NET_DEV}" | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user