Skip to content

docs: add Kueue and HAMi vGPU quota lab#608

Open
lixd wants to merge 2 commits into
Project-HAMi:masterfrom
lixd:docs/kueue-hami-vgpu-lab
Open

docs: add Kueue and HAMi vGPU quota lab#608
lixd wants to merge 2 commits into
Project-HAMi:masterfrom
lixd:docs/kueue-hami-vgpu-lab

Conversation

@lixd

@lixd lixd commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What changed

  • add Lab 9 for managing HAMi vGPU workloads with Kueue admission control
  • cover HAMi DRA compatibility mode, ResourceSlice inspection, and container-visible GPU slicing
  • configure Kueue ResourceTransformation rules for total vGPU memory and compute accounting
  • verify that two Jobs are admitted while a third remains suspended when queue quotas are exhausted
  • add three reusable Kubernetes manifests
  • add the Chinese translation
  • register the lab in the Tutorials sidebar, overview pages, and Chinese tutorial tags

Why

This turns a community-tested Kueue and HAMi vGPU walkthrough into a reproducible HAMi hands-on lab with captured outputs, explicit quota evidence, cleanup steps, and reusable manifests. It demonstrates how to enforce vGPU count, memory, and compute quotas before Pods reach normal scheduling.

Important review notes

  • the captured outputs come from Kubernetes 1.36.1, containerd 2.2.4, Kueue 0.18.1, and HAMi 2.9.0 on a single 15 GiB Tesla T4
  • the Kueue v1beta2 configuration and ResourceTransformation syntax are version-specific and are called out explicitly in the lab
  • the standalone smoke Pod is deleted before the queue test so its GPU allocation cannot mask the Kueue quota result
  • the lab uses HAMi DRA compatibility mode: workloads keep requesting nvidia.com/gpu, nvidia.com/gpumem, and nvidia.com/gpucores, while the HAMi webhook creates the underlying DRA claim
  • the memory-limit evidence is described as a container-visible 4096 MiB ceiling; the lab does not claim an OOM enforcement test

Validation

  • parsed all three Kubernetes YAML files successfully
  • ran the repository Markdown lint rules: 0 errors
  • ran the repository Prettier check: all files passed
  • built the complete Docusaurus site for both English and Chinese locales successfully
  • served the production build locally and verified HTTP 200 responses for the English and Chinese Lab 9 routes
  • checked English and Chinese heading/code-block parity: 13 level-two headings and 68 fence markers in each file
  • checked sidebars-tutorials.js with node --check
  • checked the commit for DCO sign-off

AI assistance

Codex helped restructure and translate the author's existing, independently verified experiment into the HAMi Lab format. The technical commands, environment details, and captured Kubernetes outputs originate from the author's real test environment.

Summary by CodeRabbit

  • New Features
    • Added Lab 9, a hands-on tutorial for managing HAMi vGPU workloads with Kueue.
    • Demonstrates vGPU slicing, quota configuration for GPU count, memory, and compute, and workload admission behavior.
    • Includes ready-to-use examples for smoke testing, queues, quotas, and three sample Jobs.
    • Added the lab to the tutorials sidebar, overview pages, and Kueue tag index.

Signed-off-by: lixd <xueduan.li@gmail.com>
@netlify

netlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 943f9f1
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a56f85096d66c0008e013bc
😎 Deploy Preview https://deploy-preview-608--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 requested a review from mesutoezdil July 15, 2026 02:39
@hami-robot

hami-robot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lixd
Once this PR has been reviewed and has the lgtm label, please assign windsonsea 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 a review from windsonsea July 15, 2026 02:39
@hami-robot hami-robot Bot added the size/XL label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lixd, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 20427825-7168-47fe-82f8-a255e741d2d9

📥 Commits

Reviewing files that changed from the base of the PR and between 3c18561 and 943f9f1.

📒 Files selected for processing (2)
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kueue-hami-vgpu.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/tags.yml
📝 Walkthrough

Walkthrough

新增实验 9,演示 HAMi DRA vGPU 切片与 Kueue 配额转换、队列准入和超额 Job 挂起,并补充 Kubernetes 示例清单、导航、标签及实验概览内容。

Changes

HAMi vGPU 队列实验

Layer / File(s) Summary
教程入口与实验框架
tutorials/labs/kueue-hami-vgpu.md, i18n/zh/.../labs/kueue-hami-vgpu.md, tutorials/overview.md, i18n/zh/.../overview.md, i18n/zh/.../tags.yml, sidebars-tutorials.js
新增实验元数据、流程概览、标签、侧边栏入口及实验总览描述。
HAMi DRA 安装与验证
tutorials/labs/kueue-hami-vgpu.md, i18n/zh/.../labs/kueue-hami-vgpu.md, tutorials/labs/examples/09-kueue-hami-vgpu/01-smoke-pod.yaml
配置 HAMi DRA 模式,检查 DeviceClassResourceSliceResourceClaim,并验证 vGPU 显存限制。
Kueue 转换与队列配额
tutorials/labs/kueue-hami-vgpu.md, i18n/zh/.../labs/kueue-hami-vgpu.md, tutorials/labs/examples/09-kueue-hami-vgpu/02-queues.yaml
配置资源转换,将 vGPU 显存和算力请求折算为总量配额,并创建 Kueue 队列对象。
Job 准入、阻塞与清理
tutorials/labs/kueue-hami-vgpu.md, i18n/zh/.../labs/kueue-hami-vgpu.md, tutorials/labs/examples/09-kueue-hami-vgpu/03-jobs.yaml
提交三个同规格 Job,验证两个运行、一个保持 Suspended,并补充使用量检查、清理步骤和实验结论。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant HAMi DRA
  participant Kueue
  participant Kubernetes Scheduler
  User->>HAMi DRA: Submit vGPU workload
  HAMi DRA->>Kueue: Expose vGPU resource request
  Kueue->>Kueue: Transform memory and core requests into quota usage
  Kueue->>Kubernetes Scheduler: Admit workloads within quota
  Kubernetes Scheduler->>HAMi DRA: Create and schedule admitted Pods
  Kueue-->>User: Keep excess workload Suspended
Loading

Suggested reviewers: rootsongjc, wawa0210, windsonsea

Poem

小兔排队抱 GPU,
HAMi 切片亮晶晶。
Kueue 算好显存与核,
两只任务先运行。
第三只安静等通知。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a Kueue and HAMi vGPU quota lab.
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.
✨ 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.

@rootsongjc

Copy link
Copy Markdown
Contributor

End of linkinator summary. sirv non-2xx/3xx responses:
[02:45:59] 404 ─ 0.08ms ─ /zh/tutorials/tags/quota
[02:46:44] 404 ─ 0.07ms ─ /zh/tutorials/tags/quota

Signed-off-by: lixd <xueduan.li@gmail.com>
@mesutoezdil

mesutoezdil commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

thx! why is it chinese?

@rootsongjc

Copy link
Copy Markdown
Contributor

thx! why is it chinese?

Quota - 配额

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.

3 participants