Skip to content

fix(templates): dynamic CUDA repo arch for arm64 support#662

Merged
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:fix/arm64-nvidia-driver-cuda-repo
Feb 13, 2026
Merged

fix(templates): dynamic CUDA repo arch for arm64 support#662
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:fix/arm64-nvidia-driver-cuda-repo

Conversation

@ArangoGutierrez
Copy link
Collaborator

Summary

  • Replace hardcoded x86_64 in CUDA repository URL with runtime uname -m detection
  • Map aarch64 to sbsa (NVIDIA's arm64 server CUDA repo convention)
  • Add dedicated test verifying no hardcoded x86_64 and proper arch mapping

Test plan

  • Unit test verifies template uses runtime arch detection (TestNVDriverTemplate_CUDARepoArch)
  • go test ./pkg/provisioner/templates/... passes
  • golangci-lint run ./... passes (0 issues)
  • CI passes

Copilot AI review requested due to automatic review settings February 13, 2026 10:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the NVIDIA driver provisioning template to support ARM64 by making the CUDA APT repository URL architecture dynamic at runtime, and adds unit coverage to prevent regressions in that area.

Changes:

  • Replace hardcoded x86_64 in the CUDA repo URL with a runtime uname -m-based architecture variable.
  • Map aarch64 to sbsa to match NVIDIA’s ARM server CUDA repo naming.
  • Add/extend unit tests to assert the template no longer hardcodes x86_64 and includes the new arch handling logic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/provisioner/templates/nv-driver.go Adds runtime CUDA repo arch detection and uses it in the NVIDIA CUDA keyring download URL.
pkg/provisioner/templates/nv-driver_test.go Adds assertions to ensure the template doesn’t hardcode x86_64 and validates the new arch logic.

Comment on lines +118 to +120
if [[ "$CUDA_ARCH" == "aarch64" ]]; then
CUDA_ARCH="sbsa"
fi
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CUDA repo arch mapping only handles aarch64 -> sbsa. In this codebase, other templates treat uname -m as potentially returning arm64 as well (e.g., container-toolkit template maps aarch64|arm64). If uname -m returns arm64 here, the URL will become .../arm64/... which NVIDIA's CUDA repos typically don't provide for server ARM (they use sbsa), causing a 404 and breaking driver install on some arm64 environments. Consider normalizing with a case and mapping both aarch64 and arm64 to sbsa (and update the new unit test accordingly).

Suggested change
if [[ "$CUDA_ARCH" == "aarch64" ]]; then
CUDA_ARCH="sbsa"
fi
case "$CUDA_ARCH" in
aarch64|arm64)
CUDA_ARCH="sbsa"
;;
esac

Copilot uses AI. Check for mistakes.
@ArangoGutierrez
Copy link
Collaborator Author

/retest

@ArangoGutierrez ArangoGutierrez force-pushed the fix/arm64-nvidia-driver-cuda-repo branch from 1c536d8 to 1a4c795 Compare February 13, 2026 12:00
Replace hardcoded x86_64 in the CUDA repository URL with runtime
architecture detection via uname -m. Maps aarch64 to "sbsa" which
is the NVIDIA convention for arm64 server CUDA repositories.

Previously, arm64 nodes would fail to download the CUDA keyring
package because the x86_64 repo URL does not exist for arm64.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
@ArangoGutierrez ArangoGutierrez force-pushed the fix/arm64-nvidia-driver-cuda-repo branch from 1a4c795 to 13159cd Compare February 13, 2026 12:24
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21986731653

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 47.501%

Totals Coverage Status
Change from base Build 21955389842: 0.0%
Covered Lines: 2500
Relevant Lines: 5263

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants