Skip to content

Fix NVIDIA driver installation on Debian 12 security kernels - #1400

Merged
cjac merged 5 commits into
GoogleCloudDataproc:mainfrom
nvliyuan:fix-debian12-nvidia-580-dkms
Sep 11, 2026
Merged

Fix NVIDIA driver installation on Debian 12 security kernels#1400
cjac merged 5 commits into
GoogleCloudDataproc:mainfrom
nvliyuan:fix-debian12-nvidia-580-dkms

Conversation

@nvliyuan

@nvliyuan nvliyuan commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switch Debian 12 from the CUDA 12.4 local repository's NVIDIA 550 driver to the NVIDIA online repository's pinned 580 driver branch.
  • Install the headless nvidia-kernel-open-dkms and nvidia-driver-cuda packages to avoid desktop EGL/Wayland dependencies.
  • Keep the CUDA toolkit at 12.4 and leave other operating-system installation paths unchanged.

Root cause

Jenkins build 1631 failed after the Dataproc Debian 12 image picked up kernel 6.1.0-52-cloud-amd64 (6.1.178). That security kernel uses the four-argument pci_resize_resource API, while the bundled NVIDIA 550 open module calls the old three-argument API and fails DKMS compilation.

Test plan

  • bash -n spark-rapids/spark-rapids.sh
  • git diff --check
  • Created a two-worker T4 cluster using 2.3-debian12 (2.3.34-debian12) with the patched init action.
  • Verified both workers on kernel 6.1.0-50-cloud-amd64 loaded NVIDIA driver 580.178.04.
  • Verified /usr/local/cuda/bin/nvcc reports CUDA 12.4 on both workers.

Validation artifacts are under yuanli@spark-yuanli:~/work/csps/dataproc/v26.06/debian12-580-fix.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a repository-based installation path for the NVIDIA GPU driver on Debian 12 to address compatibility issues with kernel 6.1.0-52. The feedback recommends using curl with retries and downloading the keyring package to /tmp instead of using wget in the current working directory, ensuring consistency with the rest of the script and preventing workspace pollution.

Comment thread spark-rapids/spark-rapids.sh Outdated
@nvliyuan
nvliyuan marked this pull request as ready for review August 6, 2026 07:03
nvliyuan and others added 2 commits August 6, 2026 15:04
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: liyuan <yuali@nvidia.com>
@nvliyuan

Copy link
Copy Markdown
Contributor Author

CC @cjac could you help check thx

@cjac

cjac commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

Signed-off-by: liyuan <yuali@nvidia.com>
@nvliyuan

Copy link
Copy Markdown
Contributor Author

update the plugin version to 26.08.1, could you help trigger /gcbrun again? thx @cjac

@cjac

cjac commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

1 similar comment
@cjac

cjac commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@cjac

cjac commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The 2.2-debian12 run didn't work. I'm bringing it up in my lab now

@nvliyuan

nvliyuan commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

I just double checked the current PR head on a fresh 2.2-debian12 cluster (2.2.84-debian12), it successfully init
image

@nvliyuan

nvliyuan commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi @cjac , not sure could we merge this?

@cjac

cjac commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Sorry, I haven't had time to finish quite yet. Next week, I think, I'll have enough time complete the work.

@cjac

cjac commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Sorry for the continued delay. I've got a lot on my plate but I may find myself with time this afternoon.

@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

taking a look now

@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

1 similar comment
@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

oof. Debian 11 just went out of support.

@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The 2.1-debian11 and 2.2-debian12 clusters aren't transitioning to RUNNING ; I'm debugging what might be going wrong. I'll continue this tomorrow

@cjac

cjac commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

/gcbrun

This commit introduces DKMS module caching in GCS to drastically improve
cluster startup latency on identical nodes (especially in CI or scaling
events). It also addresses several critical compatibility issues with
Debian distributions.

### Changes Details:

- **DKMS Module Caching**:
  - Implemented GCS-based caching for locally compiled DKMS modules using
    `dkms mktarball` and `ldtarball`.
  - Unique cache paths isolate builds by OS, Kernel, Arch, CUDA version,
    and Optional Signing Key Modulus.
  - Added support for mirroring signed DKMS cache to unsigned paths to
    support systems booting in insecure mode.
  - Added fallback support for standard `modulus_md5sum` metadata attribute.

- **Debian Compatibility Fixes**:
  - **Debian 12**: Override incompatible NVIDIA 550 driver with version
    `580.95.05`. The Debian 12 security kernel includes API changes
    incompatible with the 550 series.
  - **Debian 11**: Explicitly downgrade `libglapi-mesa` and `ca-certificates`
    to resolve conflicts with standard `bullseye/main` versions required
    by CUDA dependencies.

- **APT Maintenance for EOL Distros**:
  - Set `Acquire::Check-Valid-Until "false"` to ignore expired release files.
  - Remove defunct `debian-security` lines for Debian 10 and 11 to prevent
    `404 Not Found` errors during `apt-get update`.

- **Build Pipeline Fix**:
  - Updated Bazel GPG key URL to `releases.bazel.build` in CloudBuild Dockerfile.
@cjac
cjac self-requested a review September 11, 2026 19:23

@cjac cjac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review: Feature Branch fix-debian12-nvidia-580-dkms

Overview

This branch adds DKMS module caching to Dataproc and applies fixes for Debian compatibility (Debian 11 and 12) in NVIDIA driver installation paths.


Technical Details

DKMS Cache Implementation

  • Function: get_dkms_cache_path derives paths based on host and kernel details.
  • Storage: Retains standard dataproc-temp-bucket usage.
  • Recovery: restore_dkms_cache checks for cache existence and loads via dkms ldtarball. Execution proceeds if cache is missing.
  • Save Path: save_dkms_cache creates tarball via dkms mktarball and uploads to GCS. Supports fallback if --archive flag fails.

OS Overrides

  • Debian 11: Forces installation of libglapi-mesa=20.3.5-1 and ca-certificates=20210119 to resolve dependency conflicts with CUDA packages.
  • Debian 12: Overrides default driver to 580.95.05 if 550 series is detected, avoiding kernel API incompatibilities.

Security

  • Path Construction: Paths are derived from VM introspection and non-secret GCE metadata.
  • Local Keys: Script relies on standard local permissions for key access.

Verdict

Code addresses startup latency via caching and resolves documented EOL repo blockers.

@cjac
cjac force-pushed the fix-debian12-nvidia-580-dkms branch from ffc4812 to 5519740 Compare September 11, 2026 19:29
@cjac
cjac merged commit 05e1332 into GoogleCloudDataproc:main Sep 11, 2026
7 of 8 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.

2 participants