Skip to content

Commit 30bd588

Browse files
Add Ubuntu 26.04 driver container with package-based driver install
For the passthrough driver type, install the NVIDIA driver from apt packages in the ubuntu2604 CUDA repository and build the kernel modules with DKMS, replacing the .run installer. The vGPU driver type keeps the .run flow. The image build preinstalls the driver userspace (nvidia-headless-no-dkms-open plus the display/codec libraries it omits, for .run parity), pinned to the exact release by nvidia-driver-pinning-<version>, and downloads the metapackage shims, the DKMS/kernel-source packages for both kernel module flavors, and nvidia-firmware into a local file: apt repository baked into the image. At container start the flavor-appropriate metapackage (nvidia-open for open/auto, cuda-drivers for proprietary) installs offline from the local repo and DKMS builds the modules against the host kernel headers; dkms autoinstall -k reruns as a check since the package postinst exits 0 even when it skips the build. The fast path installs nothing, so container restarts stay offline as with the baked .run file. Runtime network access is needed only for kernel headers. nvidia-firmware is reinstalled at container start: the GPU operator mounts /lib/firmware in the driver container from the host so the kernel can read the GSP firmware, and that mount hides the copy installed at image build. The reinstall writes the files into the mounted host directory, which the .run installer achieves by writing the firmware at install time. The fast path mounts the driver rootfs before starting the daemons so that GPU initialization always finds the firmware. Ubuntu 26.04 kernel debs ship their payload under usr/lib/modules (merged-usr), so the kernel prerequisites step extracts module files from there. zstd is installed at build so DKMS compresses built modules to match the kernel's module compression. KERNEL_MODULE_TYPE=auto resolves to open without runtime detection: every driver branch in the ubuntu2604 repository (>= 595) supports Turing+ GPUs only, where open is the recommended default. CI builds ubuntu26.04 for 595.71.05; branch 580 is excluded since the ubuntu2604 repository does not carry it. MAX_THREADS (init -m) is not honored on the package path: the NVIDIA dkms.conf hardcodes -j$(nproc). The compressed image is 0.84 GB on amd64, vs 0.68 GB for the ubuntu24.04 .run image built from the same commit. Signed-off-by: Rajath Agasthya <ragasthya@nvidia.com>
1 parent 2b2c2e9 commit 30bd588

12 files changed

Lines changed: 1285 additions & 1 deletion

File tree

.common-ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ trigger-pipeline:
8989
matrix:
9090
- DRIVER_VERSION: [580.173.02, 595.71.05]
9191

92+
# The ubuntu2604 CUDA repository carries only driver branches >= 595
93+
.driver-versions-ubuntu26.04:
94+
parallel:
95+
matrix:
96+
- DRIVER_VERSION: [595.71.05]
97+
9298
.driver-versions-rhel10:
9399
parallel:
94100
matrix:
@@ -127,6 +133,10 @@ trigger-pipeline:
127133
variables:
128134
DIST: ubuntu24.04
129135

136+
.dist-ubuntu26.04:
137+
variables:
138+
DIST: ubuntu26.04
139+
130140
.dist-rhel8:
131141
variables:
132142
DIST: rhel8
@@ -223,6 +233,14 @@ trigger-pipeline:
223233
rules:
224234
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_TAG == null
225235

236+
.release-ubuntu26.04:
237+
# Perform for each DRIVER_VERSION
238+
extends:
239+
- .release-generic
240+
- .driver-versions-ubuntu26.04
241+
rules:
242+
- if: $CI_PIPELINE_SOURCE != "schedule" && $CI_COMMIT_TAG == null
243+
226244
.release-rhel9:
227245
# Perform for each DRIVER_VERSION
228246
extends:
@@ -301,6 +319,15 @@ trigger-pipeline:
301319
OUT_REGISTRY: "${NGC_REGISTRY}"
302320
OUT_IMAGE_NAME: "${NGC_STAGING_REGISTRY}/driver"
303321

322+
.release:staging-ubuntu26.04:
323+
extends:
324+
- .release-ubuntu26.04
325+
variables:
326+
OUT_REGISTRY_USER: "${NGC_REGISTRY_USER}"
327+
OUT_REGISTRY_TOKEN: "${NGC_REGISTRY_TOKEN}"
328+
OUT_REGISTRY: "${NGC_REGISTRY}"
329+
OUT_IMAGE_NAME: "${NGC_STAGING_REGISTRY}/driver"
330+
304331
.release:staging-rhel9:
305332
extends:
306333
- .release-rhel9
@@ -391,6 +418,13 @@ release:staging-ubuntu24.04:
391418
needs:
392419
- image-ubuntu24.04
393420

421+
release:staging-ubuntu26.04:
422+
extends:
423+
- .release:staging-ubuntu26.04
424+
- .dist-ubuntu26.04
425+
needs:
426+
- image-ubuntu26.04
427+
394428
release:staging-rhel8:
395429
extends:
396430
- .release:staging

.github/workflows/image.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
dist:
3434
- ubuntu22.04
3535
- ubuntu24.04
36+
- ubuntu26.04
3637
- rhel8
3738
- rhel9
3839
- rhel10
@@ -41,6 +42,10 @@ jobs:
4142
- rocky10
4243
ispr:
4344
- ${{github.event_name == 'pull_request'}}
45+
# The ubuntu2604 CUDA repository carries only driver branches >= 595
46+
exclude:
47+
- dist: ubuntu26.04
48+
driver: 580.173.02
4449
fail-fast: false
4550
steps:
4651
- uses: actions/checkout@v7

.gitlab-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,15 @@ include:
5858
rules:
5959
- if: $CI_PIPELINE_SOURCE != "schedule"
6060

61+
# Define the image build targets
62+
.image-build-ubuntu26.04:
63+
# Perform for each DRIVER_VERSION
64+
extends:
65+
- .driver-versions-ubuntu26.04
66+
- .image-build-generic
67+
rules:
68+
- if: $CI_PIPELINE_SOURCE != "schedule"
69+
6170
# Define the image build targets
6271
.image-build-rhel9:
6372
# Perform for each DRIVER_VERSION
@@ -86,6 +95,11 @@ image-ubuntu24.04:
8695
- .image-build-ubuntu24.04
8796
- .dist-ubuntu24.04
8897

98+
image-ubuntu26.04:
99+
extends:
100+
- .image-build-ubuntu26.04
101+
- .dist-ubuntu26.04
102+
89103
image-rhel8:
90104
extends:
91105
- .image-build

.nvidia-ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ variables:
8888
when: never
8989
- !reference [.image-pull-rules, rules]
9090

91+
.image-pull-ubuntu26.04:
92+
# Perform for each DRIVER_VERSION
93+
extends:
94+
- .driver-versions-ubuntu26.04
95+
- .image-pull-generic
96+
rules:
97+
- if: $CI_PIPELINE_SOURCE == "schedule"
98+
when: never
99+
- !reference [.image-pull-rules, rules]
100+
91101
.image-pull-rhel10:
92102
# Perform for each DRIVER_VERSION
93103
extends:
@@ -159,6 +169,11 @@ image-ubuntu24.04:
159169
- .image-pull-ubuntu24.04
160170
- .dist-ubuntu24.04
161171

172+
image-ubuntu26.04:
173+
extends:
174+
- .image-pull-ubuntu26.04
175+
- .dist-ubuntu26.04
176+
162177
image-rhel8:
163178
extends:
164179
- .image-pull
@@ -271,6 +286,18 @@ image-rocky10:
271286
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
272287
- !reference [.pipeline-trigger-rules, rules]
273288

289+
.scan-ubuntu26.04:
290+
# Repeat for each DRIVER_VERSION
291+
extends:
292+
- .driver-versions-ubuntu26.04
293+
- .scan-generic
294+
rules:
295+
- !reference [.scan-rules-common, rules]
296+
- if: $CI_PIPELINE_SOURCE == "schedule"
297+
when: never
298+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
299+
- !reference [.pipeline-trigger-rules, rules]
300+
274301
.scan-rhel10:
275302
# Repeat for each DRIVER_VERSION
276303
extends:
@@ -351,6 +378,22 @@ scan-ubuntu24.04-arm64:
351378
needs:
352379
- image-ubuntu24.04
353380

381+
scan-ubuntu26.04-amd64:
382+
extends:
383+
- .scan-ubuntu26.04
384+
- .dist-ubuntu26.04
385+
- .platform-amd64
386+
needs:
387+
- image-ubuntu26.04
388+
389+
scan-ubuntu26.04-arm64:
390+
extends:
391+
- .scan-ubuntu26.04
392+
- .dist-ubuntu26.04
393+
- .platform-arm64
394+
needs:
395+
- image-ubuntu26.04
396+
354397
scan-precompiled-ubuntu24.04-amd64:
355398
variables:
356399
PLATFORM: linux/amd64
@@ -508,6 +551,12 @@ release:ngc-ubuntu24.04:
508551
- .dist-ubuntu24.04
509552
- .driver-versions-ubuntu24.04
510553

554+
release:ngc-ubuntu26.04:
555+
extends:
556+
- .release:ngc
557+
- .dist-ubuntu26.04
558+
- .driver-versions-ubuntu26.04
559+
511560
release:ngc-precompiled-ubuntu24.04:
512561
variables:
513562
DIST: signed_ubuntu24.04

Makefile

Lines changed: 1 addition & 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 := ubuntu22.04 ubuntu24.04 signed_ubuntu22.04 signed_ubuntu24.04 signed_ubuntu26.04 rhel8 rhel9 rhel10 rocky8 rocky9 rocky10 precompiled_rhcos
57+
DISTRIBUTIONS := ubuntu22.04 ubuntu24.04 ubuntu26.04 signed_ubuntu22.04 signed_ubuntu24.04 signed_ubuntu26.04 rhel8 rhel9 rhel10 rocky8 rocky9 rocky10 precompiled_rhcos
5858
RHCOS_VERSIONS := rhcos4.14 rhcos4.15 rhcos4.16 rhcos4.17 rhcos4.18 rhel9.6
5959
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
6060
BASE_FROM := resolute noble jammy

ubuntu26.04/Dockerfile

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
ARG BASE_IMAGE=ubuntu:resolute-20260707
2+
3+
FROM ${BASE_IMAGE} AS build
4+
5+
ARG TARGETARCH
6+
ARG GOLANG_VERSION
7+
8+
# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
9+
ARG DRIVER_TYPE=passthrough
10+
ENV DRIVER_TYPE=$DRIVER_TYPE
11+
12+
SHELL ["/bin/bash", "-c"]
13+
14+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
15+
16+
RUN apt-get update && apt-get install -y --no-install-recommends \
17+
apt-utils \
18+
build-essential \
19+
ca-certificates \
20+
curl \
21+
git \
22+
wget && \
23+
rm -rf /var/lib/apt/lists/*
24+
25+
# download appropriate binary based on the target architecture for multi-arch builds
26+
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
27+
wget -nv -O - https://go.dev/dl/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
28+
| tar -C /usr/local -xz
29+
30+
ENV PATH=/usr/local/go/bin:$PATH
31+
32+
WORKDIR /work
33+
34+
RUN if [ "$DRIVER_TYPE" = "vgpu" ]; then \
35+
git clone https://github.com/NVIDIA/gpu-driver-container driver && \
36+
cd driver/vgpu/src && \
37+
go build -o vgpu-util && \
38+
mv vgpu-util /work; fi
39+
40+
FROM ${BASE_IMAGE}
41+
42+
SHELL ["/bin/bash", "-c"]
43+
44+
ARG TARGETARCH
45+
ENV TARGETARCH=$TARGETARCH
46+
ARG DRIVER_VERSION
47+
ARG GIT_COMMIT
48+
ENV DRIVER_VERSION=$DRIVER_VERSION
49+
ENV DEBIAN_FRONTEND=noninteractive
50+
51+
# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
52+
ARG DRIVER_TYPE=passthrough
53+
ENV DRIVER_TYPE=$DRIVER_TYPE
54+
ARG DRIVER_BRANCH=595
55+
ENV DRIVER_BRANCH=$DRIVER_BRANCH
56+
ARG VGPU_LICENSE_SERVER_TYPE=NLS
57+
ENV VGPU_LICENSE_SERVER_TYPE=$VGPU_LICENSE_SERVER_TYPE
58+
# Enable vGPU version compability check by default
59+
ARG DISABLE_VGPU_VERSION_CHECK=true
60+
ENV DISABLE_VGPU_VERSION_CHECK=$DISABLE_VGPU_VERSION_CHECK
61+
ENV NVIDIA_VISIBLE_DEVICES=void
62+
63+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
64+
65+
RUN echo "TARGETARCH=$TARGETARCH"
66+
67+
ADD install.sh /tmp
68+
69+
RUN usermod -o -u 0 -g 0 _apt && \
70+
/tmp/install.sh depinstall
71+
72+
# Install the driver payload for passthrough/baremetal types; the vgpu type installs from a
73+
# .run file at container start
74+
RUN /tmp/install.sh driver_pkgs_install
75+
76+
COPY nvidia-driver /usr/local/bin
77+
78+
COPY --from=build /work/vgpu-util* /usr/local/bin
79+
80+
ADD drivers drivers/
81+
82+
WORKDIR /drivers
83+
84+
# Install / upgrade packages here that are required to resolve CVEs
85+
ARG CVE_UPDATES
86+
RUN if [ -n "${CVE_UPDATES}" ]; then \
87+
apt-get update && apt-get --only-upgrade -y install ${CVE_UPDATES} && \
88+
rm -rf /var/lib/apt/lists/*; \
89+
fi
90+
91+
LABEL io.k8s.display-name="NVIDIA Driver Container"
92+
LABEL name="NVIDIA Driver Container"
93+
LABEL vendor="NVIDIA"
94+
LABEL version="${DRIVER_VERSION}"
95+
LABEL vcs-ref="${GIT_COMMIT}"
96+
LABEL release="N/A"
97+
LABEL summary="Provision the NVIDIA driver through containers"
98+
LABEL description="See summary"
99+
100+
ENTRYPOINT ["nvidia-driver", "init"]

ubuntu26.04/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Ubuntu 26.04
2+
3+
Driver container for Ubuntu 26.04.
4+
5+
For the passthrough/baremetal driver type, the NVIDIA driver is installed from the NVIDIA CUDA
6+
APT repository (`ubuntu2604`) instead of the `.run` installer:
7+
8+
- At image build, the version-specific `nvidia-driver-pinning-<version>` package pins the whole
9+
driver tree to `DRIVER_VERSION`, the full driver userspace is preinstalled into the image, and
10+
the kernel module packages are baked into a local `file:` APT repo. The CUDA network repository
11+
is then removed from the APT sources.
12+
- At container start, the kernel headers for the running kernel are installed, then the driver
13+
metapackage (`nvidia-open` for `KERNEL_MODULE_TYPE=open`/`auto`, `cuda-drivers` for
14+
`proprietary`) is installed from the local repo and DKMS builds the kernel modules. Network
15+
access is needed only for the kernel headers.
16+
17+
The vGPU driver type continues to install from a user-supplied `.run` file placed in `drivers/`.
18+
19+
See https://github.com/NVIDIA/nvidia-docker/wiki/Driver-containers-(Beta)

ubuntu26.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

ubuntu26.04/empty

Whitespace-only changes.

0 commit comments

Comments
 (0)