Update the build process to build CUDA images

This commit is contained in:
Halim Qarroum
2023-03-13 21:07:22 +00:00
parent 102b3c8133
commit 7d177f65d6
5 changed files with 136 additions and 29 deletions
+19 -22
View File
@@ -1,4 +1,4 @@
FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
FROM adoptopenjdk/openjdk11:alpine-jre
# Docker labels.
LABEL maintainer "Halim Qarroum <hqm.post@gmail.com>"
@@ -10,26 +10,23 @@ LABEL version "1.0.0"
COPY deps/redir/redir.c /usr/src/redir.c
# Installing required packages.
RUN apt update -y && \
apt install -y --no-install-recommends \
build-essential \
bash \
unzip \
wget \
libvirt-daemon \
dbus \
openjdk-11-jdk \
ca-certificates-java \
virt-manager \
libvulkan1 \
xvfb \
libgl1-mesa-glx \
libgl1-mesa-dri \
iproute2 && \
# Compile `redir`.
gcc /usr/src/redir.c -o /usr/bin/redir && \
strip /usr/bin/redir && \
rm -rf /var/lib/apt/lists/*
RUN apk update && \
apk upgrade && \
apk add --no-cache \
alpine-sdk \
bash \
unzip \
wget \
libvirt-daemon \
dbus \
polkit \
virt-manager && \
# Compile `redir`.
gcc /usr/src/redir.c -o /usr/bin/redir && \
strip /usr/bin/redir && \
# Cleanup APK.
apk del alpine-sdk && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apk/*
# Arguments that can be overriden at build-time.
ARG INSTALL_ANDROID_SDK=1
@@ -38,7 +35,7 @@ ARG IMG_TYPE=google_apis
ARG ARCHITECTURE=x86_64
ARG CMD_LINE_VERSION=9477386_latest
ARG DEVICE_ID=pixel
ARG GPU_ACCELERATED=true
ARG GPU_ACCELERATED=false
# Environment variables.
ENV ANDROID_SDK_ROOT=/opt/android \