Skip to content

Commit 2ac52e6

Browse files
tariq1890shivakunv
authored andcommitted
ubuntu24.04 precompile image support
Signed-off-by: shiva kumar <[email protected]>
1 parent eea136d commit 2ac52e6

File tree

11 files changed

+286
-24
lines changed

11 files changed

+286
-24
lines changed

.common-ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ trigger-pipeline:
8888
- DRIVER_BRANCH: [535, 550]
8989
KERNEL_FLAVOR: [aws, azure, generic, nvidia, oracle]
9090

91+
# Define the matrix of precompiled jobs that can be run in parallel for ubuntu24.04
92+
.driver-versions-precompiled-ubuntu24.04:
93+
parallel:
94+
matrix:
95+
- DRIVER_BRANCH: [535, 550]
96+
KERNEL_FLAVOR: [aws, azure, generic, nvidia, oracle]
97+
9198
# Define the distribution targets
9299
.dist-ubuntu20.04:
93100
variables:
@@ -172,6 +179,14 @@ trigger-pipeline:
172179
rules:
173180
- if: $CI_PIPELINE_SOURCE != "schedule"
174181

182+
.release-ubuntu24.04:
183+
# Perform for each DRIVER_VERSION
184+
extends:
185+
- .release-generic
186+
- .driver-versions
187+
rules:
188+
- if: $CI_PIPELINE_SOURCE != "schedule"
189+
175190
.release-rhel9:
176191
# Perform for each DRIVER_VERSION
177192
extends:
@@ -304,3 +319,14 @@ release:staging-precompiled-ubuntu22.04:
304319
- .release:staging-precompiled
305320
needs:
306321
- image-precompiled-ubuntu22.04
322+
323+
# Precompiled Ubuntu24.04 release
324+
release:staging-precompiled-ubuntu24.04:
325+
variables:
326+
DIST: signed_ubuntu24.04
327+
BASE_TARGET: noble
328+
extends:
329+
- .driver-versions-precompiled-ubuntu24.04
330+
- .release:staging-precompiled
331+
needs:
332+
- image-precompiled-ubuntu24.04

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
4141
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
4242
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
43-
holodeck_config: "tests/holodeck.yaml"
43+
holodeck_config: "tests/holodeck_ubuntu22.04.yaml"
4444

4545
- name: Get public dns name
4646
id: get_public_dns_name

.github/workflows/precompiled.yaml

Lines changed: 72 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,20 @@
1515
# Run this workflow on a schedule
1616
name: Precompiled images
1717

18+
# on:
19+
# schedule:
20+
# - cron: '00 09 * * *' # scheduled job
21+
1822
on:
19-
schedule:
20-
- cron: '00 09 * * *'
23+
pull_request:
24+
types:
25+
- opened
26+
- synchronize
27+
branches:
28+
- ci-precompile-ubuntu24.04
29+
push:
30+
branches:
31+
- ci-precompile-ubuntu24.04
2132

2233
jobs:
2334
set-driver-version-matrix:
@@ -43,7 +54,8 @@ jobs:
4354
echo "kernel_flavors=$kernel_flavors_json" >> $GITHUB_OUTPUT
4455
4556
# get ubuntu distributions
46-
DIST=("ubuntu22.04")
57+
# DIST=("ubuntu22.04" "ubuntu24.04")
58+
DIST=("ubuntu24.04")
4759
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
4860
echo "dist=$dist_json" >> $GITHUB_OUTPUT
4961
@@ -55,11 +67,16 @@ jobs:
5567
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
5668
flavor: ${{ fromJson(needs.set-driver-version-matrix.outputs.kernel_flavors) }}
5769
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
70+
exclude:
71+
- dist: ubuntu24.04
72+
driver_branch: 535
5873
steps:
5974
- uses: actions/checkout@v4
6075
name: Check out code
6176
- name: Calculate build vars
6277
id: vars
78+
env:
79+
DIST: ${{ matrix.dist }}
6380
run: |
6481
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
6582
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
@@ -70,6 +87,14 @@ jobs:
7087
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7188
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7289
90+
if [ "$DIST" == "ubuntu22.04" ]; then
91+
echo "BASE_TARGET=jammy" >> $GITHUB_OUTPUT
92+
echo "LTS_KERNEL=5.15" >> $GITHUB_OUTPUT
93+
elif [ "$DIST" == "ubuntu24.04" ]; then
94+
echo "BASE_TARGET=noble" >> $GITHUB_OUTPUT
95+
echo "LTS_KERNEL=6.8" >> $GITHUB_OUTPUT
96+
fi
97+
7398
- name: Set up QEMU
7499
uses: docker/setup-qemu-action@v3
75100
- name: Set up Docker Buildx
@@ -84,9 +109,10 @@ jobs:
84109
env:
85110
IMAGE_NAME: ghcr.io/nvidia/driver
86111
VERSION: ${COMMIT_SHORT_SHA}
87-
BASE_TARGET: jammy
112+
BASE_TARGET: ${{ steps.vars.outputs.BASE_TARGET }}
113+
LTS_KERNEL: ${{ steps.vars.outputs.LTS_KERNEL }}
88114
run: |
89-
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}
115+
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} LTS_KERNEL=${LTS_KERNEL} build-base-${BASE_TARGET}
90116
91117
trap "docker rm -f base-${BASE_TARGET}-${{ matrix.flavor }}" EXIT
92118
docker run -d --name base-${BASE_TARGET}-${{ matrix.flavor }} ghcr.io/nvidia/driver:base-${BASE_TARGET}-${{ matrix.flavor }}-${{ matrix.driver_branch }}
@@ -105,12 +131,13 @@ jobs:
105131
source kernel_version.txt && \
106132
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver_branch }} build-${DIST}-${DRIVER_VERSION}
107133
108-
- name: Save build image as a tar
134+
- name: Save build image and kernel version file
109135
env:
110136
DIST: ${{ matrix.dist }}
111137
PRIVATE_REGISTRY: "ghcr.io"
112138
run: |
113139
source kernel_version.txt
140+
tar -cvf kernel-version-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar kernel_version.txt
114141
docker save "${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}" \
115142
-o ./driver-images-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar
116143
# set env for artifacts upload
@@ -123,12 +150,21 @@ jobs:
123150
name: driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
124151
path: ./driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
125152
retention-days: 1
126-
153+
154+
- name: Upload kernel version as an artifact
155+
uses: actions/upload-artifact@v4
156+
with:
157+
name: kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
158+
path: ./kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
159+
retention-days: 1
160+
127161
determine-e2e-test-matrix:
128162
runs-on: linux-amd64-cpu4
129163
strategy:
130164
matrix:
131165
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
166+
ispr:
167+
- ${{github.event_name == 'pull_request'}}
132168
needs:
133169
- precompiled-build-image
134170
- set-driver-version-matrix
@@ -149,16 +185,28 @@ jobs:
149185
- name: Set kernel version
150186
id: set_kernel_version
151187
env:
152-
BASE_TARGET: "jammy"
153188
DIST: ${{ matrix.dist }}
189+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154190
run: |
155191
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
156192
193+
if [ "$DIST" == "ubuntu22.04" ]; then
194+
export BASE_TARGET="jammy"
195+
export LTS_KERNEL="5.15"
196+
elif [ "$DIST" == "ubuntu24.04" ]; then
197+
export BASE_TARGET="noble"
198+
export LTS_KERNEL="6.8"
199+
fi
200+
157201
kernel_flavors_json='${{ needs.set-driver-version-matrix.outputs.kernel_flavors }}'
158202
KERNEL_FLAVORS=($(echo "$kernel_flavors_json" | jq -r '.[]'))
159203
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
160204
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
161205
206+
if [ "$DIST" == "ubuntu24.04" ]; then
207+
DRIVER_BRANCHES=("${DRIVER_BRANCHES[@]/535}")
208+
DRIVER_BRANCHES=("${DRIVER_BRANCHES[@]}")
209+
fi
162210
source ./tests/scripts/ci-precompiled-helpers.sh
163211
KERNEL_VERSIONS=($(get_kernel_versions_to_test $BASE_TARGET KERNEL_FLAVORS[@] DRIVER_BRANCHES[@] $DIST))
164212
if [ -z "$KERNEL_VERSIONS" ]; then
@@ -201,7 +249,7 @@ jobs:
201249
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
202250
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
203251
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
204-
holodeck_config: "tests/holodeck.yaml"
252+
holodeck_config: "tests/holodeck_${{ matrix.dist }}.yaml"
205253

206254
- name: Get public dns name
207255
id: get_public_dns_name
@@ -222,6 +270,15 @@ jobs:
222270
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
223271
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
224272
273+
# step added to skip azure e2e tests and publish the image
274+
# FIXME -- remove step once azure kernel upgrade starts working
275+
- name: Skip azure e2e
276+
run: |
277+
if [[ "${KERNEL_VERSION}" == *-azure ]]; then
278+
echo "e2e test for azure flavor skipped, as kernel upgrade AWS => azure is not supported"
279+
exit 0
280+
fi
281+
225282
- name: Install GitHub CLI
226283
run: |
227284
sudo apt-get update
@@ -296,7 +353,12 @@ jobs:
296353
matrix:
297354
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
298355
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
299-
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
356+
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
357+
ispr:
358+
- ${{github.event_name == 'pull_request'}}
359+
exclude:
360+
- dist: ubuntu24.04
361+
driver_branch: 535
300362
steps:
301363
- name: Check out code
302364
uses: actions/checkout@v4

.gitlab-ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ include:
5353
.image-build-ubuntu24.04:
5454
# Perform for each DRIVER_VERSION
5555
extends:
56-
- .driver-versions-ubuntu24.04
56+
- .driver-versions
5757
- .image-build-generic
5858
rules:
5959
- if: $CI_PIPELINE_SOURCE != "schedule"
@@ -120,3 +120,12 @@ image-precompiled-ubuntu22.04:
120120
extends:
121121
- .driver-versions-precompiled-ubuntu22.04
122122
- .image-build-precompiled
123+
124+
image-precompiled-ubuntu24.04:
125+
variables:
126+
DIST: signed_ubuntu24.04
127+
BASE_TARGET: noble
128+
CVE_UPDATES: "curl libc6"
129+
extends:
130+
- .driver-versions-precompiled-ubuntu24.04
131+
- .image-build-precompiled

.nvidia-ci.yml

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,30 @@ variables:
7777
- !reference [.image-pull-rules, rules]
7878

7979

80+
.image-pull-ubuntu24.04:
81+
# Perform for each DRIVER_VERSION
82+
extends:
83+
- .driver-versions
84+
- .image-pull-generic
85+
rules:
86+
- if: $CI_PIPELINE_SOURCE == "schedule"
87+
when: never
88+
- !reference [.image-pull-rules, rules]
89+
90+
image-precompiled-ubuntu24.04:
91+
variables:
92+
DIST: signed_ubuntu24.04
93+
BASE_TARGET: noble
94+
PRECOMPILED: "true"
95+
CVE_UPDATES: "curl libc6"
96+
rules:
97+
- when: delayed
98+
start_in: 30 minutes
99+
extends:
100+
- .driver-versions-precompiled-ubuntu24.04
101+
- .image-pull-generic
102+
103+
80104
.image-pull-ubuntu22.04:
81105
# Perform for each DRIVER_VERSION
82106
extends:
@@ -187,7 +211,7 @@ image-rhel8:
187211
.scan-ubuntu24.04:
188212
# Repeat for each DRIVER_VERSION
189213
extends:
190-
- .driver-versions-ubuntu24.04
214+
- .driver-versions
191215
- .scan-generic
192216
rules:
193217
- !reference [.scan-rules-common, rules]
@@ -196,6 +220,18 @@ image-rhel8:
196220
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
197221
- !reference [.pipeline-trigger-rules, rules]
198222

223+
.scan-precompiled-ubuntu24.04:
224+
variables:
225+
DIST: signed_ubuntu24.04
226+
BASE_TARGET: noble
227+
PRECOMPILED: "true"
228+
extends:
229+
- .driver-versions-precompiled-ubuntu24.04
230+
- .scan-generic
231+
rules:
232+
- !reference [.scan-rules-common, rules]
233+
- when: always
234+
199235
.scan-precompiled-ubuntu22.04:
200236
variables:
201237
DIST: signed_ubuntu22.04
@@ -306,6 +342,25 @@ release:ngc-ubuntu22.04:
306342
- .dist-ubuntu22.04
307343
- .driver-versions
308344

345+
release:ngc-ubuntu24.04:
346+
extends:
347+
- .release:ngc
348+
- .dist-ubuntu24.04
349+
- .driver-versions
350+
351+
release:ngc-precompiled-ubuntu24.04:
352+
variables:
353+
DIST: signed_ubuntu24.04
354+
BASE_TARGET: noble
355+
PRECOMPILED: "true"
356+
extends:
357+
- .driver-versions-precompiled-ubuntu24.04
358+
- .release-generic
359+
- .release:ngc-variables
360+
rules:
361+
# Only run NGC release job on scheduled pipelines
362+
- if: $CI_PIPELINE_SOURCE == "schedule"
363+
309364
release:ngc-precompiled-ubuntu22.04:
310365
variables:
311366
DIST: signed_ubuntu22.04
@@ -433,6 +488,23 @@ release:ngc-rhel8.10:
433488
- 'echo "Signing the image ${IMAGE_NAME}:${IMAGE_TAG}"'
434489
- ngc-cli/ngc registry image publish --source ${IMAGE_NAME}:${IMAGE_TAG} ${IMAGE_NAME}:${IMAGE_TAG} --public --discoverable --allow-guest --sign --org nvidia
435490

491+
sign:ngc-precompiled-ubuntu24.04:
492+
extends:
493+
- .driver-versions-precompiled-ubuntu24.04
494+
- .dist-ubuntu22.04
495+
- .release-generic
496+
- .release:ngc-variables
497+
- .sign:ngc
498+
variables:
499+
DIST: signed_ubuntu24.04
500+
BASE_TARGET: noble
501+
PRECOMPILED: "true"
502+
needs:
503+
- release:ngc-precompiled-ubuntu24.04
504+
rules:
505+
# Only run NGC release job on scheduled pipelines
506+
- if: $CI_PIPELINE_SOURCE == "schedule"
507+
436508
sign:ngc-precompiled-ubuntu22.04:
437509
extends:
438510
- .driver-versions-precompiled-ubuntu22.04
@@ -455,6 +527,9 @@ sign:ngc-ubuntu-rhel-rhcos:
455527
- .sign:ngc
456528
parallel:
457529
matrix:
530+
- SIGN_JOB_NAME: ["ubuntu"]
531+
VERSION: ["24.04"]
532+
DRIVER_VERSION: ["535.216.03", "550.127.08"]
458533
- SIGN_JOB_NAME: ["ubuntu"]
459534
VERSION: ["22.04"]
460535
DRIVER_VERSION: ["535.216.03", "550.127.08"]

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ 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 ubuntu24.04 signed_ubuntu20.04 signed_ubuntu22.04 signed_ubuntu24.04 rhel8 rhel9 flatcar fedora36 sles15.3 precompiled_rhcos
57+
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
5858
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
59-
BASE_FROM := jammy focal
59+
BASE_FROM := jammy focal noble
6060
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
6161
DRIVER_PUSH_TARGETS := $(foreach push_target, $(PUSH_TARGETS), $(addprefix $(push_target)-, $(DRIVER_VERSIONS)))
6262
BUILD_TARGETS := $(patsubst %, build-%, $(DISTRIBUTIONS))
@@ -210,6 +210,7 @@ $(BASE_BUILD_TARGETS):
210210
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
211211
--build-arg DRIVER_BRANCH="$(DRIVER_BRANCH)" \
212212
--build-arg KERNEL_FLAVOR="$(KERNEL_FLAVOR)" \
213+
--build-arg LTS_KERNEL="$(LTS_KERNEL)" \
213214
--file $(DOCKERFILE) \
214215
$(CURDIR)/base
215216

0 commit comments

Comments
 (0)