Skip to content
Draft
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
4 changes: 1 addition & 3 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ name: image
on:
push:
branches:
- main
- "pull-request/[0-9]+"
- release-*
- precompiled-arm-support-no

jobs:
image:
Expand Down
74 changes: 44 additions & 30 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
name: Precompiled images

on:
push:
branches:
- precompiled-arm-support
schedule:
- cron: '00 09 * * *'

Expand All @@ -34,22 +37,26 @@ jobs:
id: extract_driver_branch
run: |
# get driver_branch
DRIVER_BRANCH=("535" "570" "580")
# DRIVER_BRANCH=("535" "570" "580")
DRIVER_BRANCH=("580")
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" "azure-fde" "generic" "nvidia" "oracle")
# KERNEL_FLAVORS=("aws" "azure" "azure-fde" "generic" "nvidia" "oracle")
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" "ubuntu24.04")
# DIST=("ubuntu22.04" "ubuntu24.04")
DIST=("ubuntu24.04")
dist_json=$(printf '%s\n' "${DIST[@]}" | jq -R . | jq -cs .)
echo "dist=$dist_json" >> $GITHUB_OUTPUT

# LTS_KERNEL setup
LTS_KERNEL=("5.15" "6.8")
# LTS_KERNEL=("5.15" "6.8")
LTS_KERNEL=("6.8")
lts_kernel_json=$(printf '%s\n' "${LTS_KERNEL[@]}" | jq -R . | jq -cs .)
echo "lts_kernel=$lts_kernel_json" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -79,7 +86,13 @@ jobs:

GENERATE_ARTIFACTS="false"
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV

# Enable multi-arch builds only for Ubuntu 24.04 when generating artifacts
if [[ "${{ matrix.dist }}" == "ubuntu24.04" ]]; then
echo "BUILD_MULTI_ARCH_IMAGES=true" >> $GITHUB_ENV
else
echo "BUILD_MULTI_ARCH_IMAGES=false" >> $GITHUB_ENV
fi

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -117,6 +130,7 @@ jobs:
IMAGE_NAME: ghcr.io/nvidia/driver
PRECOMPILED: "true"
DIST: signed_${{ matrix.dist }}
VERSION: ""
run: |
source kernel_version.txt && \
make DRIVER_VERSIONS=${DRIVER_VERSIONS} DRIVER_BRANCH=${{ matrix.driver_branch }} build-${DIST}-${DRIVER_VERSION}
Expand Down Expand Up @@ -273,18 +287,18 @@ jobs:

# slack notification for new kernel release before e2e tests starts
# as e2e tests may fail for new kernel release
- name: Slack notification
if: steps.set_kernel_version.outputs.matrix_values_not_empty == '1'
uses: slackapi/[email protected]
with:
token: ${{ secrets.SLACK_BOT_TOKEN }}
method: chat.postMessage
payload: |
{
"channel": "${{ secrets.SLACK_CHANNEL_ID }}",
"text": "${{ secrets.DETECTED_PRECOMPILED_KERNEL_MESSAGE }} ${{ steps.set_kernel_version.outputs.published_kernels }} \n
Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
# - name: Slack notification
# if: steps.set_kernel_version.outputs.matrix_values_not_empty == '1'
# uses: slackapi/[email protected]
# with:
# token: ${{ secrets.SLACK_BOT_TOKEN }}
# method: chat.postMessage
# payload: |
# {
# "channel": "${{ secrets.SLACK_CHANNEL_ID }}",
# "text": "${{ secrets.DETECTED_PRECOMPILED_KERNEL_MESSAGE }} ${{ steps.set_kernel_version.outputs.published_kernels }} \n
# Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# }

e2e-tests-nvidiadriver:
runs-on: linux-amd64-cpu4
Expand Down Expand Up @@ -439,7 +453,7 @@ jobs:
image_path="./base-images-${{ matrix.driver_branch }}-${{ matrix.kernel_version }}.tar"
echo "uploading $image_path"
docker load -i $image_path
docker push ${PRIVATE_REGISTRY}/nvidia/driver:base-${BASE_TARGET}-${LTS_KERNEL}-${KERNEL_FLAVOR}-${{ matrix.driver_branch }}
# docker push ${PRIVATE_REGISTRY}/nvidia/driver:base-${BASE_TARGET}-${LTS_KERNEL}-${KERNEL_FLAVOR}-${{ matrix.driver_branch }}

- name: Download built image artifact
if: ${{ ! (matrix.driver_branch == 535 && contains(matrix.kernel_version, 'ubuntu24.04')) }}
Expand All @@ -454,16 +468,16 @@ jobs:
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 }}
# docker push ${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}

- name: Slack notification
if: ${{ ! (matrix.driver_branch == 535 && contains(matrix.kernel_version, 'ubuntu24.04')) }}
uses: slackapi/[email protected]
with:
token: ${{ secrets.SLACK_BOT_TOKEN }}
method: chat.postMessage
payload: |
{
"channel": "${{ secrets.SLACK_CHANNEL_ID }}",
"text": "${{ secrets.PUBLISHED_PRECOMPILED_IMAGE_MESSAGE }} ${{ env.PRIVATE_REGISTRY }}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}"
}
# - name: Slack notification
# if: ${{ ! (matrix.driver_branch == 535 && contains(matrix.kernel_version, 'ubuntu24.04')) }}
# uses: slackapi/[email protected]
# with:
# token: ${{ secrets.SLACK_BOT_TOKEN }}
# method: chat.postMessage
# payload: |
# {
# "channel": "${{ secrets.SLACK_CHANNEL_ID }}",
# "text": "${{ secrets.PUBLISHED_PRECOMPILED_IMAGE_MESSAGE }} ${{ env.PRIVATE_REGISTRY }}/nvidia/driver:${{ matrix.driver_branch }}-${{ matrix.kernel_version }}"
# }
1 change: 0 additions & 1 deletion multi-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ $(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
12 changes: 7 additions & 5 deletions ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ ENV NVIDIA_VISIBLE_DEVICES=void

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

RUN dpkg --add-architecture i386 && \
# Add i386 architecture only for amd64 builds (not available on ARM)
RUN if [ "$TARGETARCH" = "amd64" ]; then dpkg --add-architecture i386; fi && \
apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
Expand All @@ -31,11 +32,12 @@ RUN dpkg --add-architecture i386 && \
pkg-config && \
rm -rf /var/lib/apt/lists/*

# Fetch GPG keys for CUDA repo
RUN apt-key del 3bf863cc && \
# Fetch GPG keys for CUDA repo (architecture-specific)
RUN CUDA_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "sbsa" || echo "x86_64") && \
apt-key del 3bf863cc && \
rm /etc/apt/sources.list.d/cuda.list && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub | gpg --dearmor -o /etc/apt/keyrings/cuda.pub && \
echo "deb [signed-by=/etc/apt/keyrings/cuda.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64 /" > /etc/apt/sources.list.d/cuda.list
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${CUDA_ARCH}/3bf863cc.pub | gpg --dearmor -o /etc/apt/keyrings/cuda.pub && \
echo "deb [signed-by=/etc/apt/keyrings/cuda.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${CUDA_ARCH} /" > /etc/apt/sources.list.d/cuda.list

RUN usermod -o -u 0 -g 0 _apt

Expand Down
14 changes: 12 additions & 2 deletions ubuntu24.04/precompiled/local-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,25 @@ download_driver_package_deps () {
pushd ${LOCAL_REPO_DIR}

download_apt_with_dep linux-objects-nvidia-${DRIVER_BRANCH}-server-${KERNEL_VERSION}
download_apt_with_dep linux-signatures-nvidia-${KERNEL_VERSION}

# linux-signatures-nvidia (secure boot signatures) is not available for arm64
if [ "$TARGETARCH" = "amd64" ]; then
download_apt_with_dep linux-signatures-nvidia-${KERNEL_VERSION}
fi

download_apt_with_dep linux-modules-nvidia-${DRIVER_BRANCH}-server-${KERNEL_VERSION}
download_apt_with_dep linux-modules-nvidia-${DRIVER_BRANCH}-server-open-${KERNEL_VERSION}
download_apt_with_dep nvidia-utils-${DRIVER_BRANCH}-server
download_apt_with_dep nvidia-headless-no-dkms-${DRIVER_BRANCH}-server
download_apt_with_dep libnvidia-decode-${DRIVER_BRANCH}-server
download_apt_with_dep libnvidia-extra-${DRIVER_BRANCH}-server
download_apt_with_dep libnvidia-encode-${DRIVER_BRANCH}-server
download_apt_with_dep libnvidia-fbc1-${DRIVER_BRANCH}-server

# SHIVAKU: TODO: Remove this once libnvidia-fbc1 is available for arm64
# libnvidia-fbc1 (FrameBuffer Capture) is not available for arm64
if [ "$TARGETARCH" = "amd64" ]; then
download_apt_with_dep libnvidia-fbc1-${DRIVER_BRANCH}-server
fi

fabricmanager_download
nscq_download
Expand Down
Loading