Skip to content

Commit

Permalink
ubuntu24.04 ci pipeline fix
Browse files Browse the repository at this point in the history
ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 ci pipeline fix

Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Nov 13, 2024
1 parent 0a86527 commit a3e371b
Show file tree
Hide file tree
Showing 15 changed files with 139 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ trigger-pipeline:
.driver-versions:
parallel:
matrix:
- DRIVER_VERSION: [535.216.01, 550.127.05]
- DRIVER_VERSION: [535.216.01, 550.127.05, 565.57.01]

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

# Define the matrix of precompiled jobs that can be run in parallel for ubuntu22.04
.driver-versions-precompiled-ubuntu22.04:
parallel:
matrix:
- DRIVER_BRANCH: [535, 550]
- DRIVER_BRANCH: [535, 550, 565]
KERNEL_FLAVOR: [aws, azure, generic, nvidia, oracle]

# Define the distribution targets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/holodeck.yaml"
holodeck_config: "tests/holodeck_ubuntu22.04.yaml"

- name: Get public dns name
id: get_public_dns_name
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ on:
- opened
- synchronize
branches:
- main
- release-*
- main-no
push:
branches:
- main
- release-*
- main-no

jobs:
image:
Expand Down Expand Up @@ -91,6 +89,7 @@ jobs:
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/driver
VERSION: ${COMMIT_SHORT_SHA}
run: |
echo "DRIVER_VERSIONS=${{ matrix.driver }} make build-${{ matrix.dist }}-${{ matrix.driver }}"
DRIVER_VERSIONS=${{ matrix.driver }} make build-${{ matrix.dist }}-${{ matrix.driver }}
pre-compiled:
Expand Down Expand Up @@ -156,6 +155,7 @@ jobs:
VERSION: ${COMMIT_SHORT_SHA}
BASE_TARGET: jammy
run: |
echo "make DRIVER_BRANCH=${{ matrix.driver }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}"
make DRIVER_BRANCH=${{ matrix.driver }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}
trap "docker rm -f base-${BASE_TARGET}-${{ matrix.flavor }}" EXIT
Expand All @@ -172,5 +172,6 @@ jobs:
PRECOMPILED: "true"
DIST: signed_ubuntu22.04
run: |
source kernel_version.txt && \
source kernel_version.txt
echo "make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver }} build-${DIST}-${DRIVER_VERSION}"
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver }} build-${DIST}-${DRIVER_VERSION}
32 changes: 25 additions & 7 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,20 @@
# Run this workflow on a schedule
name: Precompiled images

# on:
# schedule:
# - cron: '00 09 * * *' # scheduled job

on:
schedule:
- cron: '00 09 * * *'
pull_request:
types:
- opened
- synchronize
branches:
- ci-precompile-ubuntu24.04
push:
branches:
- ci-precompile-ubuntu24.04

jobs:
set-driver-version-matrix:
Expand All @@ -33,17 +44,24 @@ jobs:
id: extract_driver_branch
run: |
# get driver_branch
DRIVER_BRANCH=("535" "550")
# DRIVER_BRANCH=("535" "550" "565")
# DRIVER_BRANCH=("535" "550")
DRIVER_BRANCH=("550")
driver_branch_json=$(printf '%s\n' "${DRIVER_BRANCH[@]}" | jq -R . | jq -cs .)
echo "driver_branch=$driver_branch_json" >> $GITHUB_OUTPUT
# get kernel flavors
KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws" "azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("azure" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws")
KERNEL_FLAVORS=("generic")
kernel_flavors_json=$(printf '%s\n' "${KERNEL_FLAVORS[@]}" | jq -R . | jq -cs .)
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
# get ubuntu distributions
DIST=("ubuntu22.04")
# DIST=("ubuntu22.04" "ubuntu24.04")
# DIST=("ubuntu22.04")
DIST=("ubuntu24.04")
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
echo "dist=$dist_json" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -201,7 +219,7 @@ jobs:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/holodeck.yaml"
holodeck_config: "tests/holodeck_${{ matrix.dist }}.yaml"

- name: Get public dns name
id: get_public_dns_name
Expand Down Expand Up @@ -296,7 +314,7 @@ jobs:
matrix:
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ sign:ngc-ubuntu-rhel-rhcos:
matrix:
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["24.04"]
DRIVER_VERSION: ["535.216.01", "550.127.05", "565.57.01"]
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["22.04"]
DRIVER_VERSION: ["535.216.01", "550.127.05", "565.57.01"]
Expand Down
2 changes: 1 addition & 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 ubuntu24.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_ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.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
3 changes: 3 additions & 0 deletions base/generate-ci-config
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ DRIVER_VERSION=$(apt-cache show nvidia-utils-${DRIVER_BRANCH}-server |grep Versi
# Latest supported kernel
SK=$(echo $SUPPORTED_KERNELS | awk '{print $NF}')

# SHIVA
#SK=$(echo $SUPPORTED_KERNELS | awk '{print $(NF-1)}')

# Write to file
echo "export KERNEL_VERSION=$SK DRIVER_VERSION=$DRIVER_VERSION DRIVER_VERSIONS=$DRIVER_VERSION" > /var/kernel_version.txt
echo "KERNEL_VERSION=$SK DRIVER_VERSION=$DRIVER_VERSION DRIVER_VERSIONS=$DRIVER_VERSION"
3 changes: 3 additions & 0 deletions tests/cases/nvidia-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ fi

# export gpu-operator options
export TEST_CASE_ARGS="$1"
echo "uploading image SHIVA $2"
if [[ $# -eq 2 ]]; then
export IMAGE_PATH="$2"
echo "uploading image SHIVA 1"
sudo ctr -n k8s.io images import "$IMAGE_PATH"
echo "uploading image SHIVA 2"
fi

SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )"
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions tests/holodeck_ubuntu24.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: holodeck.nvidia.com/v1alpha1
kind: Environment
metadata:
name: HOLODECK_NAME
description: "end-to-end test infrastructure"
spec:
provider: aws
auth:
keyName: cnt-ci
privateKey: HOLODECK_PRIVATE_KEY
instance:
type: g4dn.xlarge
region: us-west-1
ingressIpRanges:
- 18.190.12.32/32
- 3.143.46.93/32
- 52.15.119.136/32
- 35.155.108.162/32
- 35.162.190.51/32
- 54.201.61.24/32
image:
architecture: amd64
imageId: ami-0da424eb883458071
containerRuntime:
install: true
name: containerd
version: 1.6.24
kubernetes:
install: true
installer: kubeadm
version: v1.30.0
crictlVersion: v1.30.0
5 changes: 5 additions & 0 deletions tests/scripts/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ check_pod_ready() {
else
# print status of pod
kubectl get pods -n ${TEST_NAMESPACE}
echo "SHIVA AAAAAAAAA CHECK"
sudo ctr -n k8s.io images ls
echo "SHIVA AAAAAAAAA CHECK============="
kubectl describe pod $(kubectl get pods -n ${TEST_NAMESPACE} --no-headers | grep "nvidia-driver-daemonset" | awk '{print $1}') -n ${TEST_NAMESPACE}
kubectl logs $(kubectl get pods -n ${TEST_NAMESPACE} --no-headers | grep "nvidia-driver-daemonset" | awk '{print $1}') -n ${TEST_NAMESPACE}
fi

return 1
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/ci-precompiled-helpers.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
get_kernel_versions_to_test() {
if [[ "$#" -ne 4 ]]; then
echo " Error:$0 must be called with BASE_TARGET DRIVER_BRANCHES DRIVER_BRANCHES DIST" >&2
echo " Error:$0 must be called with BASE_TARGET KERNEL_FLAVORS DRIVER_BRANCHES DIST" >&2
exit 1
fi

Expand Down
18 changes: 12 additions & 6 deletions ubuntu24.04/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ dep_install () {

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 && \
# 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 && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main universe" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-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 && \
#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 && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main universe" > /etc/apt/sources.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main universe" >> /etc/apt/sources.list && \
usermod -o -u 0 -g 0 _apt
else
echo "TARGETARCH doesn't match a known arch target"
Expand Down
54 changes: 40 additions & 14 deletions ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@ RUN dpkg --add-architecture i386 && \
pkg-config && \
rm -rf /var/lib/apt/lists/*

RUN 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 && \
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu noble-updates main restricted" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu noble-security main restricted" >> /etc/apt/sources.list && \

# RUN 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

RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main universe" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main universe" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu jammy-updates main restricted" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu jammy-security main restricted" >> /etc/apt/sources.list && \
usermod -o -u 0 -g 0 _apt

RUN curl -fsSL -o /usr/local/bin/donkey https://github.com/3XX0/donkey/releases/download/v1.1.0/donkey && \
Expand All @@ -49,20 +55,40 @@ RUN if [ -n "${CVE_UPDATES}" ]; then \
fi

# update pkg cache and install pkgs for userspace driver libs
RUN apt-get update && apt-get install -y --no-install-recommends nvidia-driver-${DRIVER_BRANCH}-server \
nvidia-fabricmanager-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 \
libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1 && \
apt-get purge -y \
libnvidia-egl-wayland1 \
nvidia-dkms-${DRIVER_BRANCH}-server \
nvidia-kernel-source-${DRIVER_BRANCH}-server \
xserver-xorg-video-nvidia-${DRIVER_BRANCH}-server && \
RUN apt-get update; \
FABRIC_PACKAGE=""; \
echo "Print nvidia-fabric* package before installation"; \
apt list nvidia-fabric*; \
apt list libnvidia-nscq*; \
# if apt list nvidia-fabric-manager-${DRIVER_VERSION}-1 &>/dev/null; then \
# FABRIC_PACKAGE="nvidia-fabric-manager-${DRIVER_VERSION}-1"; \
# elif apt list nvidia-fabricmanager-${DRIVER_BRANCH} &>/dev/null; then \
FABRIC_PACKAGE="nvidia-fabricmanager-${DRIVER_BRANCH}"; \
# else \
# echo "No Fabric Manager package found"; \
# exit 1; \
# fi; \
LIBNSCQ_PACKAGE="libnvidia-nscq-${DRIVER_BRANCH}"; \
# LIBNSCQ_PACKAGE="libnvidia-nscq-${DRIVER_BRANCH}=${DRIVER_VERSION}-1";\
apt-get install -y --no-install-recommends nvidia-driver-${DRIVER_BRANCH}-server \
${FABRIC_PACKAGE} \
${LIBNSCQ_PACKAGE} && \
apt-get purge -y \
libnvidia-egl-wayland1 \
nvidia-dkms-${DRIVER_BRANCH}-server \
nvidia-kernel-source-${DRIVER_BRANCH}-server \
xserver-xorg-video-nvidia-${DRIVER_BRANCH}-server && \
rm -rf /var/lib/apt/lists/*;

# update pkg cache and download pkgs for driver module installation during runtime.
# this is done to avoid shipping .ko files.
# avoid cleaning the cache after this to retain these packages during runtime.
RUN apt-get update && apt-get install --download-only --no-install-recommends -y linux-objects-nvidia-${DRIVER_BRANCH}-server-${KERNEL_VERSION} \
RUN apt search linux-objects-nvidia* ; \
apt search linux-signatures-nvidia*;

RUN apt update && apt-get update && apt search linux-modules*

RUN apt update && apt-get update && apt-get install --download-only --no-install-recommends -y linux-objects-nvidia-${DRIVER_BRANCH}-server-${KERNEL_VERSION} \
linux-signatures-nvidia-${KERNEL_VERSION} \
linux-modules-nvidia-${DRIVER_BRANCH}-server-${KERNEL_VERSION} \
# add support for nvidia open source driver packages during runtime
Expand Down
6 changes: 6 additions & 0 deletions ubuntu24.04/precompiled/nvidia-driver
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ _unload_driver() {

# Link and install the kernel modules from a precompiled packages
_install_driver() {
apt search linux-objects-nvidia* ; \
apt search linux-signatures-nvidia*;

apt update && apt-get update && apt search linux-objects-nvidia* ; \
apt search linux-signatures-nvidia*;

if [ "$OPEN_KERNEL_MODULES_ENABLED" = true ]; then
echo "Installing Open NVIDIA driver kernel modules..."
apt-get install --no-install-recommends -y \
Expand Down

0 comments on commit a3e371b

Please sign in to comment.