Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ trigger-pipeline:
matrix:
- DRIVER_VERSION: [535.216.03, 550.127.08]

# Define the driver versions for jobs that can be run in parallel
.driver-versions-ubuntu24.04:
parallel:
matrix:
- DRIVER_VERSION: [550.127.08]

# Define the matrix of precompiled jobs that can be run in parallel for ubuntu22.04
.driver-versions-precompiled-ubuntu22.04:
parallel:
Expand All @@ -93,6 +99,10 @@ trigger-pipeline:
DIST: ubuntu22.04
CVE_UPDATES: "openssl"

.dist-ubuntu24.04:
variables:
DIST: ubuntu24.04

.dist-rhel8:
variables:
DIST: rhel8
Expand Down Expand Up @@ -199,6 +209,15 @@ trigger-pipeline:
OUT_REGISTRY: "${CI_REGISTRY}"
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"

.release:staging-ubuntu24.04:
extends:
- .release-ubuntu24.04
variables:
OUT_REGISTRY_USER: "${CI_REGISTRY_USER}"
OUT_REGISTRY_TOKEN: "${CI_REGISTRY_PASSWORD}"
OUT_REGISTRY: "${CI_REGISTRY}"
OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/staging/driver"

.release:staging-rhel9:
extends:
- .release-rhel9
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
dist:
- ubuntu20.04
- ubuntu22.04
- ubuntu24.04
- rhel8
ispr:
- ${{github.event_name == 'pull_request'}}
Expand All @@ -49,6 +50,9 @@ jobs:
- ispr: true
dist: ubuntu20.04
driver: 550.127.08
- ispr: true
dist: ubuntu24.04
driver: 535.216.03
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
14 changes: 14 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ include:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

# Define the image build targets
.image-build-ubuntu24.04:
# Perform for each DRIVER_VERSION
extends:
- .driver-versions-ubuntu24.04
- .image-build-generic
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

# Define the image build targets
.image-build-rhel9:
# Perform for each DRIVER_VERSION
Expand All @@ -69,6 +78,11 @@ image-ubuntu22.04:
- .image-build-ubuntu22.04
- .dist-ubuntu22.04

image-ubuntu24.04:
extends:
- .image-build-ubuntu24.04
- .dist-ubuntu24.04

image-rhel8:
extends:
- .image-build
Expand Down
28 changes: 28 additions & 0 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ image-rhel8:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- !reference [.pipeline-trigger-rules, rules]

.scan-ubuntu24.04:
# Repeat for each DRIVER_VERSION
extends:
- .driver-versions-ubuntu24.04
- .scan-generic
rules:
- !reference [.scan-rules-common, rules]
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- !reference [.pipeline-trigger-rules, rules]

.scan-precompiled-ubuntu22.04:
variables:
DIST: signed_ubuntu22.04
Expand Down Expand Up @@ -229,6 +241,22 @@ scan-ubuntu22.04-arm64:
needs:
- image-ubuntu22.04

scan-ubuntu24.04-amd64:
extends:
- .scan-ubuntu24.04
- .dist-ubuntu24.04
- .platform-amd64
needs:
- image-ubuntu24.04

scan-ubuntu24.04-arm64:
extends:
- .scan-ubuntu24.04
- .dist-ubuntu24.04
- .platform-arm64
needs:
- image-ubuntu24.04

scan-precompiled-ubuntu22.04-amd64:
variables:
PLATFORM: linux/amd64
Expand Down
22 changes: 21 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(OUT_DIST)
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)

##### Public rules #####
DISTRIBUTIONS := ubuntu18.04 ubuntu20.04 ubuntu22.04 signed_ubuntu20.04 signed_ubuntu22.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
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
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
BASE_FROM := jammy focal
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
Expand Down Expand Up @@ -92,6 +92,10 @@ pull-signed_ubuntu22.04%: DIST = ubuntu22.04
pull-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
pull-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)

pull-signed_ubuntu24.04%: DIST = ubuntu24.04
pull-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
pull-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)

PLATFORM ?= linux/amd64
$(DRIVER_PULL_TARGETS): pull-%:
$(DOCKER) pull "--platform=$(PLATFORM)" "$(IMAGE)"
Expand All @@ -109,6 +113,10 @@ archive-signed_ubuntu22.04%: DIST = ubuntu22.04
archive-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
archive-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)

archive-signed_ubuntu24.04%: DIST = ubuntu24.04
archive-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
archive-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)

$(DRIVER_ARCHIVE_TARGETS): archive-%:
$(DOCKER) save "$(IMAGE)" -o "archive.tar"

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

push-signed_ubuntu24.04%: DIST = ubuntu24.04
push-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
push-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
push-signed_ubuntu24.04%: OUT_IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)

# $(DRIVER_BUILD_TARGETS) is in the form of build-$(DIST)-$(DRIVER_VERSION)
# Parse the target to set the required variables.
build-%: DIST = $(word 2,$(subst -, ,$@))
Expand Down Expand Up @@ -176,6 +189,13 @@ build-signed_ubuntu22.04%: DRIVER_TAG = $(DRIVER_BRANCH)
build-signed_ubuntu22.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
build-signed_ubuntu22.04%: DOCKER_BUILD_ARGS = --build-arg KERNEL_VERSION="$(KERNEL_VERSION)"

# ubuntu24.04 Precompiled Driver
build-signed_ubuntu24.04%: DIST = ubuntu24.04
build-signed_ubuntu24.04%: SUBDIR = ubuntu24.04/precompiled
build-signed_ubuntu24.04%: DRIVER_TAG = $(DRIVER_BRANCH)
build-signed_ubuntu24.04%: IMAGE_TAG = $(DRIVER_BRANCH)-$(KERNEL_VERSION)-$(DIST)
build-signed_ubuntu24.04%: DOCKER_BUILD_ARGS = --build-arg KERNEL_VERSION="$(KERNEL_VERSION)"

# base is an image used to poll Canonical for the latest kernel version
build-base-%: DOCKERFILE = $(CURDIR)/base/Dockerfile
build-base-%: TARGET = $(word 3,$(subst -, ,$@))
Expand Down
1 change: 1 addition & 0 deletions multi-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ $(DRIVER_PUSH_TARGETS): push-%:
build-ubuntu18.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
build-signed_ubuntu20.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
build-signed_ubuntu22.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
build-signed_ubuntu24.04%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
build-sles%: DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
109 changes: 109 additions & 0 deletions ubuntu24.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04 as build

ARG TARGETARCH
ARG GOLANG_VERSION

SHELL ["/bin/bash", "-c"]

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Remove cuda repository to avoid GPG errors
RUN rm -f /etc/apt/sources.list.d/cuda*

RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
curl \
git && \
rm -rf /var/lib/apt/lists/*



# download appropriate binary based on the target architecture for multi-arch builds
RUN OS_ARCH=${TARGETARCH/x86_64/amd64} && OS_ARCH=${OS_ARCH/aarch64/arm64} && \
curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${OS_ARCH}.tar.gz \
| tar -C /usr/local -xz

ENV PATH /usr/local/go/bin:$PATH

WORKDIR /work

RUN git clone https://github.com/NVIDIA/gpu-driver-container driver && \
cd driver/vgpu/src && \
go build -o vgpu-util && \
mv vgpu-util /work

FROM nvcr.io/nvidia/cuda:12.6.2-base-ubuntu24.04

SHELL ["/bin/bash", "-c"]

ARG BASE_URL=https://us.download.nvidia.com/tesla
ARG TARGETARCH
ENV TARGETARCH=$TARGETARCH
ARG DRIVER_VERSION
ENV DRIVER_VERSION=$DRIVER_VERSION
ENV DEBIAN_FRONTEND=noninteractive

# Arg to indicate if driver type is either of passthrough(baremetal) or vgpu
ARG DRIVER_TYPE=passthrough
ENV DRIVER_TYPE=$DRIVER_TYPE
ARG DRIVER_BRANCH=550
ENV DRIVER_BRANCH=$DRIVER_BRANCH
ARG VGPU_LICENSE_SERVER_TYPE=NLS
ENV VGPU_LICENSE_SERVER_TYPE=$VGPU_LICENSE_SERVER_TYPE
# Enable vGPU version compability check by default
ARG DISABLE_VGPU_VERSION_CHECK=true
ENV DISABLE_VGPU_VERSION_CHECK=$DISABLE_VGPU_VERSION_CHECK
ENV NVIDIA_VISIBLE_DEVICES=void

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

RUN echo "TARGETARCH=$TARGETARCH"

ADD install.sh /tmp

# Fetch GPG keys for CUDA repo
RUN apt-key del 7fa2af80 && OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub"

RUN /tmp/install.sh reposetup && /tmp/install.sh depinstall && \
curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \
chmod +x /usr/local/bin/donkey

COPY nvidia-driver /usr/local/bin

COPY --from=build /work/vgpu-util /usr/local/bin

ADD drivers drivers/

# Fetch the installer automatically for passthrough/baremetal types
RUN if [ "$DRIVER_TYPE" != "vgpu" ]; then \
cd drivers && \
/tmp/install.sh download_installer; fi

# Fabric manager packages are not available for arm64
RUN if [ "$DRIVER_TYPE" != "vgpu" ] && [ "$TARGETARCH" != "arm64" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1; fi

WORKDIR /drivers

ARG PUBLIC_KEY=empty
COPY ${PUBLIC_KEY} kernel/pubkey.x509

# Install / upgrade packages here that are required to resolve CVEs
ARG CVE_UPDATES
RUN if [ -n "${CVE_UPDATES}" ]; then \
apt-get update && apt-get upgrade -y ${CVE_UPDATES} && \
rm -rf /var/lib/apt/lists/*; \
fi

# Remove cuda repository to avoid GPG errors
RUN rm -f /etc/apt/sources.list.d/cuda*

# Add NGC DL license from the CUDA image
RUN mkdir /licenses && mv /NGC-DL-CONTAINER-LICENSE /licenses/NGC-DL-CONTAINER-LICENSE

ENTRYPOINT ["nvidia-driver", "init"]
3 changes: 3 additions & 0 deletions ubuntu24.04/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ubuntu 20.04 [![build status](https://gitlab.com/nvidia/driver/badges/master/build.svg)](https://gitlab.com/nvidia/driver/commits/master)

See https://github.com/NVIDIA/nvidia-docker/wiki/Driver-containers-(Beta)
1 change: 1 addition & 0 deletions ubuntu24.04/drivers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Folder for downloading vGPU drivers and dependent metadata files
Empty file added ubuntu24.04/empty
Empty file.
65 changes: 65 additions & 0 deletions ubuntu24.04/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash

set -eu

download_installer () {
DRIVER_ARCH=${TARGETARCH/amd64/x86_64} && DRIVER_ARCH=${DRIVER_ARCH/arm64/aarch64} && curl -fSsl -O $BASE_URL/$DRIVER_VERSION/NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run && \
chmod +x NVIDIA-Linux-$DRIVER_ARCH-$DRIVER_VERSION.run;
}

dep_install () {
if [ "$TARGETARCH" = "amd64" ]; then
dpkg --add-architecture i386 && \
apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
curl \
kmod \
file \
libelf-dev \
libglvnd-dev \
pkg-config && \
rm -rf /var/lib/apt/lists/*
elif [ "$TARGETARCH" = "arm64" ]; then
dpkg --add-architecture arm64 && \
apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
kmod \
file \
libelf-dev \
libglvnd-dev && \
rm -rf /var/lib/apt/lists/*
fi
}

repo_setup () {
if [ "$TARGETARCH" = "amd64" ]; then
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble main universe" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ noble-security main universe" >> /etc/apt/sources.list && \
usermod -o -u 0 -g 0 _apt
elif [ "$TARGETARCH" = "arm64" ]; then
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble main universe" > /etc/apt/sources.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports noble-security main universe" >> /etc/apt/sources.list && \
usermod -o -u 0 -g 0 _apt
else
echo "TARGETARCH doesn't match a known arch target"
exit 1
fi
}

if [ "$1" = "reposetup" ]; then
repo_setup
elif [ "$1" = "depinstall" ]; then
dep_install
elif [ "$1" = "download_installer" ]; then
download_installer
else
echo "Unknown function: $1"
exit 1
fi

Loading