Skip to content

Commit 3abf509

Browse files
committed
add ubuntu24.04 driver container
Signed-off-by: Tariq Ibrahim <[email protected]>
1 parent aca3aca commit 3abf509

File tree

14 files changed

+1397
-1
lines changed

14 files changed

+1397
-1
lines changed

.common-ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ trigger-pipeline:
9393
DIST: ubuntu22.04
9494
CVE_UPDATES: "openssl"
9595

96+
.dist-ubuntu24.04:
97+
variables:
98+
DIST: ubuntu24.04
99+
96100
.dist-rhel8:
97101
variables:
98102
DIST: rhel8
@@ -199,6 +203,15 @@ trigger-pipeline:
199203
OUT_REGISTRY: "${CI_REGISTRY}"
200204
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"
201205

206+
.release:staging-ubuntu24.04:
207+
extends:
208+
- .release-ubuntu24.04
209+
variables:
210+
OUT_REGISTRY_USER: "${CI_REGISTRY_USER}"
211+
OUT_REGISTRY_TOKEN: "${CI_REGISTRY_PASSWORD}"
212+
OUT_REGISTRY: "${CI_REGISTRY}"
213+
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"
214+
202215
.release:staging-rhel9:
203216
extends:
204217
- .release-rhel9

.github/workflows/image.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
dist:
4040
- ubuntu20.04
4141
- ubuntu22.04
42+
- ubuntu24.04
4243
- rhel8
4344
ispr:
4445
- ${{github.event_name == 'pull_request'}}

.gitlab-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ image-ubuntu22.04:
6969
- .image-build-ubuntu22.04
7070
- .dist-ubuntu22.04
7171

72+
image-ubuntu24.04:
73+
extends:
74+
- .image-build-ubuntu24.04
75+
- .dist-ubuntu24.04
76+
7277
image-rhel8:
7378
extends:
7479
- .image-build

.nvidia-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,22 @@ scan-ubuntu22.04-arm64:
229229
needs:
230230
- image-ubuntu22.04
231231

232+
scan-ubuntu24.04-amd64:
233+
extends:
234+
- .scan-ubuntu24.04
235+
- .dist-ubuntu24.04
236+
- .platform-amd64
237+
needs:
238+
- image-ubuntu24.04
239+
240+
scan-ubuntu24.04-arm64:
241+
extends:
242+
- .scan-ubuntu24.04
243+
- .dist-ubuntu24.04
244+
- .platform-arm64
245+
needs:
246+
- image-ubuntu24.04
247+
232248
scan-precompiled-ubuntu22.04-amd64:
233249
variables:
234250
PLATFORM: linux/amd64
@@ -427,6 +443,8 @@ sign:ngc-ubuntu-rhel-rhcos:
427443
- .sign:ngc
428444
parallel:
429445
matrix:
446+
- SIGN_JOB_NAME: ["ubuntu"]
447+
VERSION: ["24.04"]
430448
- SIGN_JOB_NAME: ["ubuntu"]
431449
VERSION: ["22.04"]
432450
DRIVER_VERSION: ["535.216.03", "550.127.08"]

Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST)
5454
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)
5555

5656
##### Public rules #####
57-
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 signed_ubuntu20.04 signed_ubuntu22.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
57+
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
5858
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
5959
BASE_FROM := jammy focal
6060
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
@@ -92,6 +92,10 @@ pull-signed_ubuntu22.04%: DIST = ubuntu22.04
9292
pull-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
9393
pull-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
9494

95+
pull-signed_ubuntu24.04%: DIST = ubuntu24.04
96+
pull-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
97+
pull-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
98+
9599
PLATFORM ?= linux/amd64
96100
$(DRIVER_PULL_TARGETS): pull-%:
97101
$(DOCKER) pull "--platform=$(PLATFORM)" "$(IMAGE)"
@@ -109,6 +113,10 @@ archive-signed_ubuntu22.04%: DIST = ubuntu22.04
109113
archive-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
110114
archive-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
111115

116+
archive-signed_ubuntu24.04%: DIST = ubuntu24.04
117+
archive-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
118+
archive-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
119+
112120
$(DRIVER_ARCHIVE_TARGETS): archive-%:
113121
$(DOCKER) save "$(IMAGE)" -o "archive.tar"
114122

@@ -130,6 +138,11 @@ push-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
130138
push-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
131139
push-signed_ubuntu22.04%: OUT_IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
132140

141+
push-signed_ubuntu24.04%: DIST = ubuntu24.04
142+
push-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
143+
push-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
144+
push-signed_ubuntu24.04%: OUT_IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
145+
133146
# $(DRIVER_BUILD_TARGETS) is in the form of build-$(DIST)-$(DRIVER_VERSION)
134147
# Parse the target to set the required variables.
135148
build-%: DIST = $(word 2,$(subst -, ,$@))
@@ -176,6 +189,13 @@ build-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
176189
build-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
177190
build-signed_ubuntu22.04%: DOCKER_BUILD_ARGS = --build-arg KERNEL_VERSION="$(KERNEL_VERSION)"
178191

192+
# ubuntu24.04 Precompiled Driver
193+
build-signed_ubuntu24.04%: DIST = ubuntu24.04
194+
build-signed_ubuntu24.04%: SUBDIR = ubuntu24.04/precompiled
195+
build-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
196+
build-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
197+
build-signed_ubuntu24.04%: DOCKER_BUILD_ARGS = --build-arg KERNEL_VERSION="$(KERNEL_VERSION)"
198+
179199
# base is an image used to poll Canonical for the latest kernel version
180200
build-base-%: DOCKERFILE = $(CURDIR)/base/Dockerfile
181201
build-base-%: TARGET = $(word 3,$(subst -, ,$@))

multi-arch.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ $(DRIVER_PUSH_TARGETS): push-%:
2727
build-ubuntu18.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
2828
build-signed_ubuntu20.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
2929
build-signed_ubuntu22.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
30+
build-signed_ubuntu24.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
3031
build-sles%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64

ubuntu24.04/Dockerfile

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04 as build
2+
3+
ARG TARGETARCH
4+
ARG GOLANG_VERSION
5+
6+
SHELL ["/bin/bash", "-c"]
7+
8+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
9+
10+
# Remove cuda repository to avoid GPG errors
11+
RUN rm -f /etc/apt/sources.list.d/cuda*
12+
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
apt-utils \
15+
build-essential \
16+
ca-certificates \
17+
curl \
18+
git && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
22+
23+
# download appropriate binary based on the target architecture for multi-arch builds
24+
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
25+
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
26+
| tar -C /usr/local -xz
27+
28+
ENV PATH /usr/local/go/bin:$PATH
29+
30+
WORKDIR /work
31+
32+
RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
33+
cd driver/vgpu/src && \
34+
go build -o vgpu-util && \
35+
mv vgpu-util /work
36+
37+
FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04
38+
39+
SHELL ["/bin/bash", "-c"]
40+
41+
ARG BASE_URL=https://us.download.nvidia.com/tesla
42+
ARG TARGETARCH
43+
ENV TARGETARCH=$TARGETARCH
44+
ARG DRIVER_VERSION
45+
ENV DRIVER_VERSION=$DRIVER_VERSION
46+
ENV DEBIAN_FRONTEND=noninteractive
47+
48+
# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
49+
ARG DRIVER_TYPE=passthrough
50+
ENV DRIVER_TYPE=$DRIVER_TYPE
51+
ARG DRIVER_BRANCH=550
52+
ENV DRIVER_BRANCH=$DRIVER_BRANCH
53+
ARG VGPU_LICENSE_SERVER_TYPE=NLS
54+
ENV VGPU_LICENSE_SERVER_TYPE=$VGPU_LICENSE_SERVER_TYPE
55+
# Enable vGPU version compability check by default
56+
ARG DISABLE_VGPU_VERSION_CHECK=true
57+
ENV DISABLE_VGPU_VERSION_CHECK=$DISABLE_VGPU_VERSION_CHECK
58+
ENV NVIDIA_VISIBLE_DEVICES=void
59+
60+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
61+
62+
RUN echo "TARGETARCH=$TARGETARCH"
63+
64+
ADD install.sh /tmp
65+
66+
# Fetch GPG keys for CUDA repo
67+
RUN apt-key del 7fa2af80 && OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
68+
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub"
69+
70+
RUN /tmp/install.sh reposetup && /tmp/install.sh depinstall && \
71+
curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \
72+
chmod +x /usr/local/bin/donkey
73+
74+
COPY nvidia-driver /usr/local/bin
75+
76+
COPY --from=build /work/vgpu-util /usr/local/bin
77+
78+
ADD drivers drivers/
79+
80+
# Fetch the installer automatically for passthrough/baremetal types
81+
RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
82+
cd drivers && \
83+
/tmp/install.sh download_installer; fi
84+
85+
# Fabric manager packages are not available for arm64
86+
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
87+
apt-get update && \
88+
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
89+
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi
90+
91+
WORKDIR /drivers
92+
93+
ARG PUBLIC_KEY=empty
94+
COPY ${PUBLIC_KEY} kernel/pubkey.x509
95+
96+
# Install / upgrade packages here that are required to resolve CVEs
97+
ARG CVE_UPDATES
98+
RUN if [ -n "${CVE_UPDATES}" ]; then \
99+
apt-get update && apt-get upgrade -y ${CVE_UPDATES} && \
100+
rm -rf /var/lib/apt/lists/*; \
101+
fi
102+
103+
# Remove cuda repository to avoid GPG errors
104+
RUN rm -f /etc/apt/sources.list.d/cuda*
105+
106+
# Add NGC DL license from the CUDA image
107+
RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE
108+
109+
ENTRYPOINT ["nvidia-driver", "init"]

ubuntu24.04/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ubuntu 20.04 [![build status](https://gitlab.com/nvidia/driver/badges/master/build.svg)](https://gitlab.com/nvidia/driver/commits/master)
2+
3+
See https://github.com/NVIDIA/nvidia-docker/wiki/Driver-containers-(Beta)

ubuntu24.04/drivers/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Folder for downloading vGPU drivers and dependent metadata files

ubuntu24.04/empty

Whitespace-only changes.

0 commit comments

Comments
 (0)