Skip to content

Commit 9260c8f

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

File tree

11 files changed

+293
-24
lines changed

11 files changed

+293
-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: 79 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,7 @@ 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")
4758
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
4859
echo "dist=$dist_json" >> $GITHUB_OUTPUT
4960
@@ -55,11 +66,16 @@ jobs:
5566
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
5667
flavor: ${{ fromJson(needs.set-driver-version-matrix.outputs.kernel_flavors) }}
5768
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
69+
exclude:
70+
- dist: ubuntu24.04
71+
driver_branch: 535
5872
steps:
5973
- uses: actions/checkout@v4
6074
name: Check out code
6175
- name: Calculate build vars
6276
id: vars
77+
env:
78+
DIST: ${{ matrix.dist }}
6379
run: |
6480
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
6581
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
@@ -70,6 +86,14 @@ jobs:
7086
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7187
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
7288
89+
if [ "$DIST" == "ubuntu22.04" ]; then
90+
echo "BASE_TARGET=jammy" >> $GITHUB_OUTPUT
91+
echo "LTS_KERNEL=5.15" >> $GITHUB_OUTPUT
92+
elif [ "$DIST" == "ubuntu24.04" ]; then
93+
echo "BASE_TARGET=noble" >> $GITHUB_OUTPUT
94+
echo "LTS_KERNEL=6.8" >> $GITHUB_OUTPUT
95+
fi
96+
7397
- name: Set up QEMU
7498
uses: docker/setup-qemu-action@v3
7599
- name: Set up Docker Buildx
@@ -84,9 +108,10 @@ jobs:
84108
env:
85109
IMAGE_NAME: ghcr.io/nvidia/driver
86110
VERSION: ${COMMIT_SHORT_SHA}
87-
BASE_TARGET: jammy
111+
BASE_TARGET: ${{ steps.vars.outputs.BASE_TARGET }}
112+
LTS_KERNEL: ${{ steps.vars.outputs.LTS_KERNEL }}
88113
run: |
89-
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} build-base-${BASE_TARGET}
114+
make DRIVER_BRANCH=${{ matrix.driver_branch }} KERNEL_FLAVOR=${{ matrix.flavor }} LTS_KERNEL=${LTS_KERNEL} build-base-${BASE_TARGET}
90115
91116
trap "docker rm -f base-${BASE_TARGET}-${{ matrix.flavor }}" EXIT
92117
docker run -d --name base-${BASE_TARGET}-${{ matrix.flavor }} ghcr.io/nvidia/driver:base-${BASE_TARGET}-${{ matrix.flavor }}-${{ matrix.driver_branch }}
@@ -105,12 +130,13 @@ jobs:
105130
source kernel_version.txt && \
106131
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver_branch }} build-${DIST}-${DRIVER_VERSION}
107132
108-
- name: Save build image as a tar
133+
- name: Save build image and kernel version file
109134
env:
110135
DIST: ${{ matrix.dist }}
111136
PRIVATE_REGISTRY: "ghcr.io"
112137
run: |
113138
source kernel_version.txt
139+
tar -cvf kernel-version-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar kernel_version.txt
114140
docker save "${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}" \
115141
-o ./driver-images-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar
116142
# set env for artifacts upload
@@ -123,12 +149,21 @@ jobs:
123149
name: driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
124150
path: ./driver-images-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
125151
retention-days: 1
126-
152+
153+
- name: Upload kernel version as an artifact
154+
uses: actions/upload-artifact@v4
155+
with:
156+
name: kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}
157+
path: ./kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar
158+
retention-days: 1
159+
127160
determine-e2e-test-matrix:
128161
runs-on: linux-amd64-cpu4
129162
strategy:
130163
matrix:
131164
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
165+
ispr:
166+
- ${{github.event_name == 'pull_request'}}
132167
needs:
133168
- precompiled-build-image
134169
- set-driver-version-matrix
@@ -149,16 +184,30 @@ jobs:
149184
- name: Set kernel version
150185
id: set_kernel_version
151186
env:
152-
BASE_TARGET: "jammy"
153187
DIST: ${{ matrix.dist }}
188+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
154189
run: |
155190
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
156191
192+
if [ "$DIST" == "ubuntu22.04" ]; then
193+
export BASE_TARGET="jammy"
194+
export LTS_KERNEL="5.15"
195+
elif [ "$DIST" == "ubuntu24.04" ]; then
196+
export BASE_TARGET="noble"
197+
export LTS_KERNEL="6.8"
198+
fi
199+
157200
kernel_flavors_json='${{ needs.set-driver-version-matrix.outputs.kernel_flavors }}'
158201
KERNEL_FLAVORS=($(echo "$kernel_flavors_json" | jq -r '.[]'))
159202
driver_branch_json='${{ needs.set-driver-version-matrix.outputs.driver_branch }}'
160203
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
161204
205+
# remove 535 driver branch for ubuntu24.04
206+
if [ "$DIST" == "ubuntu24.04" ]; then
207+
DRIVER_BRANCHES=($(for branch in "${DRIVER_BRANCHES[@]}"; do
208+
[[ $branch != "535" ]] && echo "$branch"
209+
done))
210+
fi
162211
source ./tests/scripts/ci-precompiled-helpers.sh
163212
KERNEL_VERSIONS=($(get_kernel_versions_to_test $BASE_TARGET KERNEL_FLAVORS[@] DRIVER_BRANCHES[@] $DIST))
164213
if [ -z "$KERNEL_VERSIONS" ]; then
@@ -201,7 +250,7 @@ jobs:
201250
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
202251
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
203252
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
204-
holodeck_config: "tests/holodeck.yaml"
253+
holodeck_config: "tests/holodeck_${{ matrix.dist }}.yaml"
205254

206255
- name: Get public dns name
207256
id: get_public_dns_name
@@ -222,6 +271,15 @@ jobs:
222271
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
223272
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
224273
274+
# step added to skip azure e2e tests and publish the image
275+
# FIXME -- remove step once azure kernel upgrade starts working
276+
- name: Skip azure e2e
277+
run: |
278+
if [[ "${KERNEL_VERSION}" == *-azure ]]; then
279+
echo "e2e test for azure flavor skipped, as kernel upgrade AWS => azure is not supported"
280+
exit 0
281+
fi
282+
225283
- name: Install GitHub CLI
226284
run: |
227285
sudo apt-get update
@@ -258,6 +316,12 @@ jobs:
258316
rc=0
259317
# for precompiled driver we are setting driver branch as driver version
260318
DRIVER_BRANCHES=(${{ env.DRIVER_BRANCHES }})
319+
# remove 535 driver branch for ubuntu24.04
320+
if [ "$DIST" == "ubuntu24.04" ]; then
321+
DRIVER_BRANCHES=($(for branch in "${DRIVER_BRANCHES[@]}"; do
322+
[[ $branch != "535" ]] && echo "$branch"
323+
done))
324+
fi
261325
for DRIVER_VERSION in "${DRIVER_BRANCHES[@]}"; do
262326
echo "Running e2e for DRIVER_VERSION=$DRIVER_VERSION"
263327
image="driver-images-${DRIVER_VERSION}-${KERNEL_VERSION}-${DIST}"
@@ -296,7 +360,12 @@ jobs:
296360
matrix:
297361
driver_branch: ${{ fromJson(needs.set-driver-version-matrix.outputs.driver_branch) }}
298362
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
299-
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
363+
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
364+
ispr:
365+
- ${{github.event_name == 'pull_request'}}
366+
exclude:
367+
- dist: ubuntu24.04
368+
driver_branch: 535
300369
steps:
301370
- name: Check out code
302371
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"]

0 commit comments

Comments
 (0)