Skip to content

Commit 18e9cd8

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

File tree

14 files changed

+1425
-1
lines changed

14 files changed

+1425
-1
lines changed

.common-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ trigger-pipeline:
7575
matrix:
7676
- DRIVER_VERSION: [535.216.03, 550.127.08]
7777

78+
# Define the driver versions for jobs that can be run in parallel
79+
.driver-versions-ubuntu24.04:
80+
parallel:
81+
matrix:
82+
- DRIVER_VERSION: [550.127.08]
83+
7884
# Define the matrix of precompiled jobs that can be run in parallel for ubuntu22.04
7985
.driver-versions-precompiled-ubuntu22.04:
8086
parallel:
@@ -93,6 +99,10 @@ trigger-pipeline:
9399
DIST: ubuntu22.04
94100
CVE_UPDATES: "openssl"
95101

102+
.dist-ubuntu24.04:
103+
variables:
104+
DIST: ubuntu24.04
105+
96106
.dist-rhel8:
97107
variables:
98108
DIST: rhel8
@@ -199,6 +209,15 @@ trigger-pipeline:
199209
OUT_REGISTRY: "${CI_REGISTRY}"
200210
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"
201211

212+
.release:staging-ubuntu24.04:
213+
extends:
214+
- .release-ubuntu24.04
215+
variables:
216+
OUT_REGISTRY_USER: "${CI_REGISTRY_USER}"
217+
OUT_REGISTRY_TOKEN: "${CI_REGISTRY_PASSWORD}"
218+
OUT_REGISTRY: "${CI_REGISTRY}"
219+
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"
220+
202221
.release:staging-rhel9:
203222
extends:
204223
- .release-rhel9

.github/workflows/image.yaml

Lines changed: 4 additions & 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'}}
@@ -49,6 +50,9 @@ jobs:
4950
- ispr: true
5051
dist: ubuntu20.04
5152
driver: 550.127.08
53+
- ispr: true
54+
dist: ubuntu24.04
55+
driver: 535.216.03
5256
fail-fast: false
5357
steps:
5458
- uses: actions/checkout@v4

.gitlab-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ include:
4949
rules:
5050
- if: $CI_PIPELINE_SOURCE != "schedule"
5151

52+
# Define the image build targets
53+
.image-build-ubuntu24.04:
54+
# Perform for each DRIVER_VERSION
55+
extends:
56+
- .driver-versions-ubuntu24.04
57+
- .image-build-generic
58+
rules:
59+
- if: $CI_PIPELINE_SOURCE != "schedule"
60+
5261
# Define the image build targets
5362
.image-build-rhel9:
5463
# Perform for each DRIVER_VERSION
@@ -69,6 +78,11 @@ image-ubuntu22.04:
6978
- .image-build-ubuntu22.04
7079
- .dist-ubuntu22.04
7180

81+
image-ubuntu24.04:
82+
extends:
83+
- .image-build-ubuntu24.04
84+
- .dist-ubuntu24.04
85+
7286
image-rhel8:
7387
extends:
7488
- .image-build

.nvidia-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ image-rhel8:
184184
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
185185
- !reference [.pipeline-trigger-rules, rules]
186186

187+
.scan-ubuntu24.04:
188+
# Repeat for each DRIVER_VERSION
189+
extends:
190+
- .driver-versions-ubuntu24.04
191+
- .scan-generic
192+
rules:
193+
- !reference [.scan-rules-common, rules]
194+
- if: $CI_PIPELINE_SOURCE == "schedule"
195+
when: never
196+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
197+
- !reference [.pipeline-trigger-rules, rules]
198+
187199
.scan-precompiled-ubuntu22.04:
188200
variables:
189201
DIST: signed_ubuntu22.04
@@ -229,6 +241,22 @@ scan-ubuntu22.04-arm64:
229241
needs:
230242
- image-ubuntu22.04
231243

244+
scan-ubuntu24.04-amd64:
245+
extends:
246+
- .scan-ubuntu24.04
247+
- .dist-ubuntu24.04
248+
- .platform-amd64
249+
needs:
250+
- image-ubuntu24.04
251+
252+
scan-ubuntu24.04-arm64:
253+
extends:
254+
- .scan-ubuntu24.04
255+
- .dist-ubuntu24.04
256+
- .platform-arm64
257+
needs:
258+
- image-ubuntu24.04
259+
232260
scan-precompiled-ubuntu22.04-amd64:
233261
variables:
234262
PLATFORM: linux/amd64

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 signed_ubuntu24.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)