Skip to content

Commit

Permalink
ubuntu24.04 precompile image support
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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

ubuntu24.04 precompile image support

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 precompile image support

ubuntu24.04 precompile image support

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 precompile image support

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

ubuntu24.04 precompile support

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

ubuntu24.04 precompile image support

ubuntu24.04 precompile image support

Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Nov 26, 2024
1 parent ad6a4f9 commit f177782
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 70 deletions.
8 changes: 0 additions & 8 deletions .common-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,6 @@ trigger-pipeline:
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

.release-ubuntu24.04:
# Perform for each DRIVER_VERSION
extends:
- .release-generic
- .driver-versions
rules:
- if: $CI_PIPELINE_SOURCE != "schedule"

.release-rhel9:
# Perform for each DRIVER_VERSION
extends:
Expand Down
117 changes: 77 additions & 40 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ on:
- opened
- synchronize
branches:
- ci-precompile-ubuntu24.04
- test-ubuntu24.04
push:
branches:
- ci-precompile-ubuntu24.04
- test-ubuntu24.04

jobs:
set-driver-version-matrix:
Expand Down Expand Up @@ -165,10 +165,6 @@ jobs:
needs:
- precompiled-build-image
- set-driver-version-matrix
outputs:
matrix_values_not_empty: ${{ steps.set_kernel_version.outputs.matrix_values_not_empty }}
matrix_values: ${{ steps.set_kernel_version.outputs.matrix_values }}
dist: ${{ steps.set-driver-version-matrix.outputs.dist }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -180,13 +176,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set kernel version
id: set_kernel_version
env:
DIST: ${{ matrix.dist }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
if [ "$DIST" == "ubuntu22.04" ]; then
export BASE_TARGET="jammy"
export LTS_KERNEL="5.15"
Expand All @@ -213,22 +206,66 @@ jobs:
echo "Skipping e2e tests"
exit 0
fi
for i in "${!KERNEL_VERSIONS[@]}"; do
KERNEL_VERSIONS[$i]="${KERNEL_VERSIONS[$i]}-$DIST"
done
# Convert array to JSON format and assign
echo "[]" > $GITHUB_WORKSPACE/matrix_values.json
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > $GITHUB_WORKSPACE/matrix_values.json
echo "matrix_values=$(cat $GITHUB_WORKSPACE/matrix_values.json | jq -c .)" >> $GITHUB_OUTPUT
echo "matrix_values_not_empty=1" >> $GITHUB_OUTPUT
echo "[]" > ./matrix_values_$DIST.json
printf '%s\n' "${KERNEL_VERSIONS[@]}" | jq -R . | jq -s . > ./matrix_values_$DIST.json
e2e-tests-nvidiadriver:
- name: Upload kernel matrix values as artifacts
uses: actions/upload-artifact@v4
with:
name: matrix-values-${{ matrix.dist }}
path: ./matrix_values_${{ matrix.dist }}.json

collect-e2e-test-matrix:
runs-on: linux-amd64-cpu4
needs:
- determine-e2e-test-matrix
- set-driver-version-matrix
if: ${{ needs.determine-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }}
outputs:
matrix_values_not_empty: ${{ steps.set_kernel_version.outputs.matrix_values_not_empty }}
matrix_values: ${{ steps.set_kernel_version.outputs.matrix_values }}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set and append matrix values for ubuntu
id: set_kernel_version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "matrix_values_not_empty=0" >> $GITHUB_OUTPUT
# combined_values="[]"
kernel_versions=()
# Read and merge kernel_version values from dist files
DIST=("ubuntu22.04" "ubuntu24.04")
for d in "${DIST[@]}"; do
artifact_name="matrix-values-${d}"
file_path="./matrix_values_${d}.json"
echo "Attempting to download artifact: $artifact_name"
if gh run download --name "$artifact_name" --dir ./; then
echo "Successfully downloaded artifact: $artifact_name"
value=$(jq -r '.[]' "$file_path")
kernel_versions+=($value)
echo "matrix_values_not_empty=1" >> $GITHUB_OUTPUT
fi
done
echo "Collected Kernel Versions: ${kernel_versions[@]}"
combined_values=$(printf '%s\n' "${kernel_versions[@]}" | jq -R . | jq -s -c . | tr -d ' \n')
echo "Combined Kernel Versions JSON: $combined_values"
echo "matrix_values=$combined_values" >> $GITHUB_OUTPUT
e2e-tests-nvidiadriver:
runs-on: linux-amd64-cpu4
needs:
- collect-e2e-test-matrix
- set-driver-version-matrix
if: ${{ needs.collect-e2e-test-matrix.outputs.matrix_values_not_empty == '1' }}
strategy:
matrix:
kernel_version: ${{ fromJson(needs.determine-e2e-test-matrix.outputs.matrix_values) }}
dist: ${{ fromJson(needs.set-driver-version-matrix.outputs.dist) }}
kernel_version: ${{ fromJson(needs.collect-e2e-test-matrix.outputs.matrix_values) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -238,36 +275,41 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set and Calculate test vars
run: |
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
echo "${{ secrets.AWS_SSH_KEY }}" > ${{ github.workspace }}/key.pem && chmod 400 ${{ github.workspace }}/key.pem
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV
KERNEL_VERSION="${{ matrix.kernel_version }}"
# Extract the last segment after the last dash
DIST=${KERNEL_VERSION##*-}
echo "DIST=$DIST" >> $GITHUB_ENV
KERNEL_VERSION=${KERNEL_VERSION%-*}
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
driver_branch_json="${{ needs.set-driver-version-matrix.outputs.driver_branch }}"
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
- name: Set up Holodeck
uses: NVIDIA/[email protected]
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SSH_KEY: ${{ secrets.AWS_SSH_KEY }}
DIST: ${{ env.DIST }}
with:
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_${{ matrix.dist }}.yaml"

holodeck_config: "tests/holodeck_${{ env.DIST }}.yaml"
- name: Get public dns name
id: get_public_dns_name
uses: mikefarah/yq@master
with:
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
- name: Set and Calculate test vars
- name: Calculate holodeck instance hostname
run: |
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
echo "${{ secrets.AWS_SSH_KEY }}" > ${{ github.workspace }}/key.pem && chmod 400 ${{ github.workspace }}/key.pem
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV
KERNEL_VERSION="${{ matrix.kernel_version }}"
echo "KERNEL_VERSION=$KERNEL_VERSION" >> $GITHUB_ENV
echo "DIST=${{ matrix.dist }}" >> $GITHUB_ENV
driver_branch_json="${{ needs.set-driver-version-matrix.outputs.driver_branch }}"
DRIVER_BRANCHES=($(echo "$driver_branch_json" | jq -r '.[]'))
echo "DRIVER_BRANCHES=${DRIVER_BRANCHES[*]}" >> $GITHUB_ENV
# step added to skip azure e2e tests and publish the image
# FIXME -- remove step once azure kernel upgrade starts working
Expand Down Expand Up @@ -352,16 +394,12 @@ jobs:
runs-on: linux-amd64-cpu4
needs:
- set-driver-version-matrix
- determine-e2e-test-matrix
- collect-e2e-test-matrix
- e2e-tests-nvidiadriver
strategy:
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) }}
exclude:
- dist: ubuntu24.04
driver_branch: 535
kernel_version: ${{ fromJson(needs.collect-e2e-test-matrix.outputs.matrix_values) }}
steps:
- name: Check out code
uses: actions/checkout@v4
Expand All @@ -375,17 +413,16 @@ jobs:
- name: Set image vars
run: |
echo "PRIVATE_REGISTRY=ghcr.io" >> $GITHUB_ENV
echo "DIST=${{ matrix.dist }}" >> $GITHUB_ENV
- name: Download built image artifact
uses: actions/download-artifact@v4
with:
name: driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}
name: driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}
path: ./

- name: Publish image
run: |
image_path="./driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}.tar"
image_path="./driver-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}.tar"
echo "uploading $image_path"
docker load -i $image_path
docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}-${{ env.DIST }}
docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}
41 changes: 21 additions & 20 deletions .nvidia-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ image-rhel8:
.scan-ubuntu24.04:
# Repeat for each DRIVER_VERSION
extends:
- .driver-versions
- .driver-versions-ubuntu24.04
- .scan-generic
rules:
- !reference [.scan-rules-common, rules]
Expand Down Expand Up @@ -342,24 +342,25 @@ release:ngc-ubuntu22.04:
- .dist-ubuntu22.04
- .driver-versions

release:ngc-ubuntu24.04:
extends:
- .release:ngc
- .dist-ubuntu24.04
- .driver-versions

release:ngc-precompiled-ubuntu24.04:
variables:
DIST: signed_ubuntu24.04
BASE_TARGET: noble
PRECOMPILED: "true"
extends:
- .driver-versions-precompiled-ubuntu24.04
- .release-generic
- .release:ngc-variables
rules:
# Only run NGC release job on scheduled pipelines
- if: $CI_PIPELINE_SOURCE == "schedule"
# TODO will be enabled after QA
# release:ngc-ubuntu24.04:
# extends:
# - .release:ngc
# - .dist-ubuntu24.04
# - .driver-versions

# release:ngc-precompiled-ubuntu24.04:
# variables:
# DIST: signed_ubuntu24.04
# BASE_TARGET: noble
# PRECOMPILED: "true"
# extends:
# - .driver-versions-precompiled-ubuntu24.04
# - .release-generic
# - .release:ngc-variables
# rules:
# # Only run NGC release job on scheduled pipelines
# - if: $CI_PIPELINE_SOURCE == "schedule"

release:ngc-precompiled-ubuntu22.04:
variables:
Expand Down Expand Up @@ -529,7 +530,7 @@ sign:ngc-ubuntu-rhel-rhcos:
matrix:
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["24.04"]
DRIVER_VERSION: ["535.216.03", "550.127.08"]
DRIVER_VERSION: ["550.127.05"]
- SIGN_JOB_NAME: ["ubuntu"]
VERSION: ["22.04"]
DRIVER_VERSION: ["535.216.03", "550.127.08"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ 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_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_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 noble
BASE_FROM := noble jammy focal
PUSH_TARGETS := $(patsubst %, push-%, $(DISTRIBUTIONS))
DRIVER_PUSH_TARGETS := $(foreach push_target, $(PUSH_TARGETS), $(addprefix $(push_target)-, $(DRIVER_VERSIONS)))
BUILD_TARGETS := $(patsubst %, build-%, $(DISTRIBUTIONS))
Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/findkernelversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ if [[ $status -eq 0 ]]; then
else
export should_continue=true
fi
#SHIVA
export should_continue=true

0 comments on commit f177782

Please sign in to comment.