Skip to content

docs: add NVIDIA CDI configuration guide#613

Open
spencercjh wants to merge 2 commits into
Project-HAMi:masterfrom
spencercjh:feat/cdi
Open

docs: add NVIDIA CDI configuration guide#613
spencercjh wants to merge 2 commits into
Project-HAMi:masterfrom
spencercjh:feat/cdi

Conversation

@spencercjh

@spencercjh spencercjh commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Most of this Pull Request was generated or revised with the assistance of AI tools (Codex with GPT-5.6 Sol High and kimi-code with K3). I have reviewed the resulting content and take full responsibility for its accuracy, security, licensing compliance, and inclusion in this project.

What changed

  • add a new NVIDIA CDI configuration guide (installation/configure-cdi.md) in English and Chinese, covering:
    • what the vendor-neutral CDI specification is and which problems it solves
    • HAMi's current CDI support scope: NVIDIA GPUs only; the guide does not claim support for other device vendors
    • how the HAMi NVIDIA Device Plugin uses CDI (k8s.device-plugin.nvidia.com/gpu kind, specification written to /var/run/cdi)
    • Helm chart values: devicePlugin.deviceListStrategy: "cdi-annotations", nvidiaDriverRoot, and nvidiaHookPath, with host-installed and GPU Operator path presets
    • verification steps and troubleshooting for common NVIDIA CDI errors
  • link the NVIDIA CDI guide from installation/prerequisites.md in both locales
  • point the CDI prerequisite in how-to-use-hami-dra.md at the internal guide instead of the external CDI README
  • backport the guide, links, and sidebar entries to v2.8.0 and v2.9.0
  • pin the Helm chart versions in the v2.8.0 and v2.9.0 installation commands

Why

CDI is a vendor-neutral specification, but HAMi currently implements CDI device injection only for NVIDIA GPUs. The DRA integration depends on CDI being enabled in the container runtime, yet the documentation did not explain how to configure and verify HAMi's NVIDIA CDI integration. Both v2.8.0 and v2.9.0 ship the required NVIDIA chart values and Device Plugin implementation, so the guide is included in both released versions as well as next.

This PR does not add or document CDI support for non-NVIDIA devices.

Important review notes

  • the disable-device-node-modification hook requires NVIDIA Container Toolkit >= 1.18.0
  • nvidiaHookPath pointing at nvidia-ctk is valid with Toolkit >= 1.18.0 because nvidia-ctk hook exposes the same hook subcommands as nvidia-cdi-hook
  • the documented CDI kind (k8s.device-plugin.nvidia.com/gpu) and generated specification path (/var/run/cdi/k8s.device-plugin.nvidia.com-gpu.json) match the HAMi NVIDIA Device Plugin source
  • released-version changes follow the repository's current-first, targeted per-file backport workflow; the versioned Helm commands are pinned to their corresponding Chart versions

Validation

  • npm run lint passes
  • npm run format:check passes
  • npm run build succeeds for both English and Chinese locales

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for enabling and configuring CDI-based NVIDIA GPU injection.
    • Documented prerequisites, Helm configuration, verification steps, and troubleshooting guidance.
    • Updated installation prerequisites to include CDI runtime, driver, and toolkit checks.
    • Replaced external CDI references with links to the new local guide.
  • Navigation
    • Added the CDI configuration guide to current and versioned installation menus.

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 1adacf1
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a5a53a8122bb10008183bc3
😎 Deploy Preview https://deploy-preview-613--project-hami.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hami-robot

hami-robot Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: spencercjh
Once this PR has been reviewed and has the lgtm label, please assign wawa0210 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hami-robot
hami-robot Bot requested review from mesutoezdil and wawa0210 July 17, 2026 15:47
@hami-robot hami-robot Bot added the size/XL label Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds CDI enablement documentation for HAMi, including Helm configuration, verification, troubleshooting, prerequisite links, Chinese translations, versioned pages, and installation sidebar entries.

Changes

CDI documentation rollout

Layer / File(s) Summary
CDI concepts and HAMi flow
docs/installation/configure-cdi.md, i18n/zh/.../installation/configure-cdi.md, versioned_docs/.../installation/configure-cdi.md
Documents CDI responsibilities, HAMi’s NVIDIA GPU injection flow, CDI naming, and prerequisites.
Helm CDI configuration
docs/installation/configure-cdi.md, i18n/zh/.../installation/configure-cdi.md, versioned_docs/.../installation/configure-cdi.md
Adds values-cdi.yaml settings, deployment path guidance, warnings, and Helm install/upgrade commands.
CDI verification and troubleshooting
docs/installation/configure-cdi.md, i18n/zh/.../installation/configure-cdi.md, versioned_docs/.../installation/configure-cdi.md
Adds Helm, CDI spec, executable, and log checks plus troubleshooting for driver roots, toolkit versions, and hook paths.
Prerequisite links and navigation
docs/installation/*, i18n/zh/.../installation/*, versioned_docs/.../installation/*, sidebars.js, versioned_sidebars/*
Connects installation prerequisites to the local CDI guide and adds it to current and versioned sidebars.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: rootsongjc, mesutoezdil

Poem

A rabbit hops through CDI’s trail,
With Helm charts tucked beneath its tail.
Specs bloom bright, paths align,
GPU guides now neatly shine.
“Hop verified!” the bunny sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a NVIDIA CDI configuration guide to the docs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from rootsongjc July 17, 2026 15:48
@spencercjh

Copy link
Copy Markdown
Contributor Author

/assign mesutoezdil

@spencercjh

Copy link
Copy Markdown
Contributor Author

Should we hold this PR until Project-HAMi/HAMi#2087 is merged and updated again after that?

@spencercjh

Copy link
Copy Markdown
Contributor Author

This is first-hand feedback from a client we serve. We’ve found that CDI is a rather complex issue that isn’t easy to resolve.

@spencercjh spencercjh changed the title docs(cdi): add configuration guide docs: add configuration guide for cdi Jul 17, 2026
@spencercjh spencercjh changed the title docs: add configuration guide for cdi docs: add configuration guide for NVIDIA cdi Jul 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/how-to-use-hami-dra.md`:
- Line 15: Regenerate all affected versioned documentation through the
Docusaurus versioning workflow rather than editing snapshots directly:
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/how-to-use-hami-dra.md
lines 15-15,
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/prerequisites.md
lines 23-24,
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/how-to-use-hami-dra.md
lines 21-21,
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/prerequisites.md
lines 22-23, versioned_docs/version-v2.8.0/installation/how-to-use-hami-dra.md
lines 15-15, and versioned_docs/version-v2.8.0/installation/prerequisites.md
lines 22-23. Apply the documentation change to the current source pages first,
then run the established version-generation command so every listed snapshot is
updated consistently.

In `@versioned_docs/version-v2.8.0/installation/configure-cdi.md`:
- Around line 85-92: Pin the Helm chart version in the Install or upgrade HAMi
command: add --version 2.8.0 in
versioned_docs/version-v2.8.0/installation/configure-cdi.md:85-92 and its
Chinese counterpart
i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/configure-cdi.md:86-93;
add --version 2.9.0 in
versioned_docs/version-v2.9.0/installation/configure-cdi.md:85-92 and its
Chinese counterpart
i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/configure-cdi.md:86-93.

In `@versioned_docs/version-v2.9.0/installation/how-to-use-hami-dra.md`:
- Line 21: Update the corresponding source installation docs rather than the
immutable snapshots, then regenerate the v2.9.0 documentation using the
prescribed Docusaurus versioning command. This applies to
versioned_docs/version-v2.9.0/installation/how-to-use-hami-dra.md at lines 21-21
and versioned_docs/version-v2.9.0/installation/prerequisites.md at lines 22-22;
both sites should be corrected by regenerating the snapshot.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 34223542-59de-4690-8fd6-a11cf4854160

📥 Commits

Reviewing files that changed from the base of the PR and between aa28278 and 6df1b7c.

📒 Files selected for processing (21)
  • docs/installation/configure-cdi.md
  • docs/installation/how-to-use-hami-dra.md
  • docs/installation/prerequisites.md
  • i18n/zh/docusaurus-plugin-content-docs/current/installation/configure-cdi.md
  • i18n/zh/docusaurus-plugin-content-docs/current/installation/how-to-use-hami-dra.md
  • i18n/zh/docusaurus-plugin-content-docs/current/installation/prerequisites.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/configure-cdi.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/how-to-use-hami-dra.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.8.0/installation/prerequisites.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/configure-cdi.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/how-to-use-hami-dra.md
  • i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/prerequisites.md
  • sidebars.js
  • versioned_docs/version-v2.8.0/installation/configure-cdi.md
  • versioned_docs/version-v2.8.0/installation/how-to-use-hami-dra.md
  • versioned_docs/version-v2.8.0/installation/prerequisites.md
  • versioned_docs/version-v2.9.0/installation/configure-cdi.md
  • versioned_docs/version-v2.9.0/installation/how-to-use-hami-dra.md
  • versioned_docs/version-v2.9.0/installation/prerequisites.md
  • versioned_sidebars/version-v2.8.0-sidebars.json
  • versioned_sidebars/version-v2.9.0-sidebars.json

Comment thread versioned_docs/version-v2.8.0/installation/configure-cdi.md
Comment thread versioned_docs/version-v2.9.0/installation/how-to-use-hami-dra.md
Document CDI concepts, chart values, verification, and troubleshooting in English and Chinese. Backport the guide and navigation to v2.8.0 and v2.9.0.

Signed-off-by: spencercjh <spencercjh@gmail.com>
Signed-off-by: spencercjh <spencercjh@gmail.com>
@spencercjh spencercjh changed the title docs: add configuration guide for NVIDIA cdi docs: add NVIDIA CDI configuration guide Jul 17, 2026
@mesutoezdil

Copy link
Copy Markdown
Contributor

/hold

@mesutoezdil

Copy link
Copy Markdown
Contributor

Should we hold this PR until Project-HAMi/HAMi#2087 is merged and updated again after that?

yes

@spencercjh

Copy link
Copy Markdown
Contributor Author

cc @FouoF

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants