Skip to content

Conversation

@rahulait
Copy link
Contributor

Fixes NVIDIA/gpu-operator#1244

Root cause

Package versions are rotated/updated on mirrors over time. The _install_driver() function in the nvidia-driver script was calling apt-get install without first running apt-get update. This meant it was using stale package lists that referenced package versions (like python3.10_3.10.12-1~22.04.7) that had been rotated out of the Ubuntu repositories in favor of newer/patched versions. This resulted in 404 errors when fetching those stale packages and install script exited with error.

Fix

The fix proposes running apt-get update before running any apt install.

Signed-off-by: Rahul Sharma <rahulsharm@nvidia.com>
@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 31, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rahulait rahulait requested a review from Copilot January 31, 2026 05:02
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 fixes a package installation failure caused by stale package cache by ensuring apt-get update runs before driver installation. The fix adds error handling to the cache update operation and calls it at the appropriate point in the init sequence.

Changes:

  • Added error handling to _update_package_cache() to catch and report update failures
  • Called _update_package_cache() before _install_driver() in the init() function
  • Applied changes consistently across Ubuntu 22.04 and 24.04 driver scripts (both standard and precompiled variants)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
ubuntu24.04/precompiled/nvidia-driver Added error handling to cache update and called it before driver installation
ubuntu24.04/nvidia-driver Added error handling to _update_package_cache() function
ubuntu22.04/precompiled/nvidia-driver Added error handling to cache update and called it before driver installation
ubuntu22.04/nvidia-driver Added error handling to _update_package_cache() function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rahulait
Copy link
Contributor Author

/ok to test b5573b6

Copy link
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

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

Thanks @rahulait. I assume this was only affecting the precompiled Ubuntu containers since I see you only added a call to update_package_cache there?

@rahulait
Copy link
Contributor Author

rahulait commented Feb 2, 2026

Thanks @rahulait. I assume this was only affecting the precompiled Ubuntu containers since I see you only added a call to update_package_cache there?

Yeah, others already have the call to update_package_cache in them
https://github.com/NVIDIA/gpu-driver-container/blob/main/ubuntu22.04/nvidia-driver#L775C9-L775C30
https://github.com/NVIDIA/gpu-driver-container/blob/main/ubuntu22.04/nvidia-driver#L838
https://github.com/NVIDIA/gpu-driver-container/blob/main/ubuntu24.04/nvidia-driver#L722

@cdesiniotis cdesiniotis merged commit ddec3c5 into NVIDIA:main Feb 2, 2026
59 checks passed
@rahulait rahulait deleted the update-cache branch February 3, 2026 05:32
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.

Nvidia driver daemonset does not run due to apt-cache issue.

2 participants