Skip to content

feat(driver): support multiple installation sources (package, runfile, git)#636

Merged
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:feat/issue-567-driver-sources
Feb 12, 2026
Merged

feat(driver): support multiple installation sources (package, runfile, git)#636
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:feat/issue-567-driver-sources

Conversation

@ArangoGutierrez
Copy link
Copy Markdown
Collaborator

Summary

  • Extend NVIDIADriver to install from CUDA packages (default), .run files, or by building open-gpu-kernel-modules from source
  • Follows the existing CTK/Kubernetes multi-source pattern with full backward compatibility
  • All three source paths include GPU detection, idempotency, verification, and provenance tracking

Context

Part of #567 (Phase 1 — Driver Sources). Depends on #635 (provenance) for BuildComponentsStatus to be fully aware of multi-source fields, but can be merged independently.

New API Types

  • DriverSource enum: package, runfile, git
  • DriverPackageSpec — branch + version pinning
  • DriverRunfileSpec — URL + SHA256 checksum
  • DriverGitSpec — repo + ref (defaults to open-gpu-kernel-modules)

Templates

  • Package — enhanced with provenance tracking
  • Runfile — download, SHA256 verify, --silent --dkms install
  • Git — clone, make modules, modules_install, depmod

Wiring

  • dependency.go: git ref resolution via gitref.NewGitHubResolver()

Test plan

  • 15 validation tests (all source types + edge cases)
  • 17 template tests (constructor, execute, error paths)
  • go build ./... passes
  • go vet ./... passes
  • All existing tests pass
  • E2E: provision with each source on GPU instance

…, git)

Extend NVIDIADriver to install from CUDA packages (default), .run files,
or by building open-gpu-kernel-modules from source. Follows the existing
CTK/Kubernetes multi-source pattern with full backward compatibility.

Closes: NVIDIA#567 (Phase 1 — driver sources)
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Copilot AI review requested due to automatic review settings February 11, 2026 17:16
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 21915250119

Details

  • 60 of 71 (84.51%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 46.258%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/provisioner/dependency.go 4 15 26.67%
Totals Coverage Status
Change from base Build 21903852228: 0.3%
Covered Lines: 2330
Relevant Lines: 5037

💛 - Coveralls

Copy link
Copy Markdown

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 extends the NVIDIA driver installation to support three sources: package (default, via CUDA repositories), runfile (direct .run file installation), and git (building from open-gpu-kernel-modules). The implementation follows the established multi-source pattern used for Container Toolkit and Kubernetes components, ensuring full backward compatibility with legacy Branch/Version fields.

Changes:

  • Added new API types (DriverSource enum, DriverPackageSpec, DriverRunfileSpec, DriverGitSpec) with validation logic
  • Implemented three installation templates (package, runfile, git) with GPU detection, idempotency, and provenance tracking
  • Integrated git ref resolution in dependency.go for git-based installations
  • Added comprehensive unit tests covering all source types and edge cases

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
api/holodeck/v1alpha1/types.go Adds new driver source types and specs; maintains backward compatibility with deprecated Branch/Version fields
api/holodeck/v1alpha1/validation.go Implements NVIDIADriver.Validate() with checks for all three source types
api/holodeck/v1alpha1/validation_test.go Adds 15 comprehensive test cases covering all source configurations and error conditions
pkg/provisioner/templates/nv-driver.go Refactors NewNvDriver to return error; adds three templates (package, runfile, git) with provenance tracking
pkg/provisioner/templates/nv-driver_test.go Adds 17 unit tests for constructor and Execute methods across all sources; updates license header
pkg/provisioner/dependency.go Integrates git ref resolution with 35-second timeout for git source installations

Comment on lines +469 to +470
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines 496 to 497
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +508 to +509
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +514 to +515
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +526 to +527
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +449 to +450
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +456 to +457
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +479 to +480
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines 502 to 503
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
Comment on lines +520 to +521
// +optional
// +optional
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

Duplicate kubebuilder marker: The '+optional' annotation appears twice on consecutive lines. Only one marker is needed per field.

Copilot uses AI. Check for mistakes.
@ArangoGutierrez ArangoGutierrez merged commit 4a394fc into NVIDIA:main Feb 12, 2026
25 checks passed
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