Skip to content

docs: add KServe and HAMi DRA inference lab - #755

Merged
rootsongjc merged 3 commits into
Project-HAMi:masterfrom
lixd:docs/kserve-hami-dra-lab
Aug 12, 2026
Merged

docs: add KServe and HAMi DRA inference lab#755
rootsongjc merged 3 commits into
Project-HAMi:masterfrom
lixd:docs/kserve-hami-dra-lab

Conversation

@lixd

@lixd lixd commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

  • adds Tutorial Lab 11 for serving a Hugging Face model with KServe Standard mode and HAMi native DRA GPU sharing
  • adds synchronized English and Chinese tutorials plus reusable Gateway and InferenceService manifests
  • uses hf://Qwen/Qwen2.5-0.5B-Instruct directly through KServe Storage Initializer, removing hostPath/PV model preparation
  • demonstrates two Predictor replicas sharing one physical GPU through separate 3 GiB and 20-core HAMi ResourceClaims

Which issue(s) this PR fixes:

Fixes #

Checklist:

  • npm run lint and npm run format:check pass
  • npm run build succeeds for both en and zh
  • Chinese translation updated if English docs changed (or noted why not)
  • Commits are signed off (git commit -s)

Validation notes:

  • parsed both Kubernetes YAML files successfully
  • verified KServe Storage Initializer downloaded hf://Qwen/Qwen2.5-0.5B-Instruct in the test cluster
  • verified a Predictor container saw Tesla T4, 3072 MiB and an OpenAI-compatible request returned a response
  • the final rerun was interrupted after the test node evicted KServe controllers for ephemeral-storage pressure; after disk pressure cleared, the controllers remained blocked pulling their images. This is a transient test-environment recovery issue, not a tutorial manifest change.

Summary by CodeRabbit

  • New Features
    • Added an advanced Lab 11 tutorial for deploying KServe Standard with vLLM and sharing one NVIDIA Tesla T4 across two replicas.
    • Added setup guidance for HAMi-DRA, Envoy Gateway, KServe, GPU claims, verification, inference requests, and cleanup.
    • Added Kubernetes example configurations for the gateway and inference service.
    • Added the KServe tutorial tag and linked Lab 11 in the Labs navigation.

lixd added 2 commits August 11, 2026 14:46
Signed-off-by: lixd <xueduan.li@gmail.com>
Signed-off-by: lixd <xueduan.li@gmail.com>
@hami-robot hami-robot Bot added kind/documentation Improvements or additions to documentation dco-signoff: yes labels Aug 11, 2026
@hami-robot
hami-robot Bot requested review from archlitchi and rootsongjc August 11, 2026 10:02
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

Name Link
🔨 Latest commit 4734d0b
🔍 Latest deploy log https://app.netlify.com/projects/project-hami/deploys/6a7afa7d5b52500009dc6bb2
😎 Deploy Preview https://deploy-preview-755--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.

@coderabbitai

coderabbitai Bot commented Aug 11, 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: 29 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a2d2a118-571a-454b-8606-e7f3ceebe987

📥 Commits

Reviewing files that changed from the base of the PR and between af7a90c and 4734d0b.

📒 Files selected for processing (3)
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md
  • tutorials/labs/examples/11-kserve-hami-dra/01-gateway.yaml
  • tutorials/labs/kserve-hami-dra.md
📝 Walkthrough

Walkthrough

新增 Lab 11,介绍使用 HAMi-DRA 和 KServe Standard 部署双副本 vLLM 服务,并通过 ResourceClaim 共享一张 NVIDIA Tesla T4。新增 Kubernetes 示例资源及中英文文档导航配置。

Changes

KServe HAMi-DRA 实验

Layer / File(s) Summary
Kubernetes 部署资源
tutorials/labs/examples/11-kserve-hami-dra/*
新增 Envoy Gateway、HAMi GPU ResourceClaimTemplate 和 KServe InferenceService 配置。InferenceService 使用 Qwen 模型并运行两个 Predictor 副本。
实验流程与文档接入
tutorials/labs/kserve-hami-dra.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md, tutorials/overview.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/overview.md, i18n/zh/docusaurus-plugin-content-docs-tutorials/current/tags.yml, sidebars-tutorials.js
新增组件安装、部署、GPU 共享验证、推理请求和清理步骤,并将实验加入概览、标签和 Labs 侧边栏。

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

Sequence Diagram(s)

sequenceDiagram
  participant Learner
  participant Kubernetes
  participant HAMiDRA
  participant KServe
  participant vLLM
  Learner->>Kubernetes: 安装 HAMi-DRA、Envoy Gateway 和 KServe
  Learner->>Kubernetes: 部署 Gateway、ResourceClaimTemplate 和 InferenceService
  KServe->>HAMiDRA: 创建两个独立 ResourceClaim
  HAMiDRA->>vLLM: 为两个 Predictor 副本分配共享 GPU 资源
  Learner->>vLLM: 发送 OpenAI 兼容推理请求
  vLLM-->>Learner: 返回推理结果
Loading

Possibly related issues

Possibly related PRs

  • Project-HAMi/website#560:两者都新增 HAMi GPU 共享实验、Kubernetes 示例清单和文档导航,但场景和资源配置不同。

Suggested reviewers: rootsongjc

🚥 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 and concisely identifies the addition of the KServe and HAMi DRA inference lab, which is the main change.
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.

@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: 4

🧹 Nitpick comments (2)
tutorials/labs/kserve-hami-dra.md (1)

50-59: 🩺 Stability & Availability | 🔵 Trivial

Add storage and registry preflight checks.

The prerequisites check GPU and Hugging Face access but not node ephemeral storage or access to the OCI and image registries used later. Based on the supplied PR objectives, a later rerun hit ephemeral-storage pressure and controller image-pull failures. Add a free-space check and list the required registry access before the long deployment wait.

🤖 Prompt for 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.

In `@tutorials/labs/kserve-hami-dra.md` around lines 50 - 59, Expand the
Prerequisites section to include a node ephemeral-storage free-space preflight
check and explicitly list access to the OCI and container image registries used
by the lab. Place these requirements before the deployment steps or long waits,
preserving the existing GPU, Hugging Face, and runtime prerequisites.
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md (1)

50-59: 🩺 Stability & Availability | 🔵 Trivial

补充存储和镜像仓库的前置检查。

当前前提条件检查了 GPU 和 Hugging Face 访问,但没有检查节点临时存储空间,也没有说明后续 OCI 和镜像仓库的访问要求。根据 PR 目标中的验证记录,后续重跑曾因临时存储压力和 Controller 镜像拉取失败而中断。请在长时间部署前增加磁盘空间检查,并列出所需的镜像仓库访问要求。

🤖 Prompt for 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.

In
`@i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md`
around lines 50 - 59, 在“前提条件”部分补充节点临时存储空间检查,确保长时间部署前确认有足够磁盘容量;同时明确集群需要访问后续使用的
OCI 和 Controller 镜像仓库,并保留现有 GPU、模型下载及运行时要求。
🤖 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 `@tutorials/labs/examples/11-kserve-hami-dra/01-gateway.yaml`:
- Around line 19-23: Update the Kubernetes envoyService configuration under
provider to set externalTrafficPolicy to Cluster for the NodePort service,
preserving the existing service type and other settings.

In `@tutorials/labs/kserve-hami-dra.md`:
- Around line 90-93: Add an explicit non-empty GPU_NODE validation and failure
branch before kubectl label node in both tutorials/labs/kserve-hami-dra.md
(lines 90-93) and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md
(lines 90-93), so execution stops before labeling or Helm installation when no
Tesla-T4 GPU node is found.
- Around line 64-66: Quote the GPU custom-column argument in both tutorials:
update tutorials/labs/kserve-hami-dra.md lines 64-66 and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md
lines 64-66 so the complete -o custom-columns=... argument preserves the escaped
dot before kubectl parses it; leave the following node-label command unchanged.
- Around line 245-247: In both tutorials/labs/kserve-hami-dra.md lines 245-247
and
i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md
lines 245-247, extract the hostname from the KServe InferenceService .status.url
after the readiness check and reuse it as the curl Host header, replacing the
hard-coded hostname in both language versions.

---

Nitpick comments:
In
`@i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md`:
- Around line 50-59: 在“前提条件”部分补充节点临时存储空间检查,确保长时间部署前确认有足够磁盘容量;同时明确集群需要访问后续使用的 OCI
和 Controller 镜像仓库,并保留现有 GPU、模型下载及运行时要求。

In `@tutorials/labs/kserve-hami-dra.md`:
- Around line 50-59: Expand the Prerequisites section to include a node
ephemeral-storage free-space preflight check and explicitly list access to the
OCI and container image registries used by the lab. Place these requirements
before the deployment steps or long waits, preserving the existing GPU, Hugging
Face, and runtime prerequisites.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 37801aa6-8c67-4a80-bbff-b075b9989223

📥 Commits

Reviewing files that changed from the base of the PR and between fe70b57 and af7a90c.

📒 Files selected for processing (8)
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/labs/kserve-hami-dra.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/overview.md
  • i18n/zh/docusaurus-plugin-content-docs-tutorials/current/tags.yml
  • sidebars-tutorials.js
  • tutorials/labs/examples/11-kserve-hami-dra/01-gateway.yaml
  • tutorials/labs/examples/11-kserve-hami-dra/02-inference-service.yaml
  • tutorials/labs/kserve-hami-dra.md
  • tutorials/overview.md

Comment thread tutorials/labs/examples/11-kserve-hami-dra/01-gateway.yaml
Comment thread tutorials/labs/kserve-hami-dra.md
Comment thread tutorials/labs/kserve-hami-dra.md
Comment thread tutorials/labs/kserve-hami-dra.md Outdated
Signed-off-by: lixd <xueduan.li@gmail.com>

@rootsongjc rootsongjc 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.

/lgtm

@hami-robot

hami-robot Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lixd, rootsongjc
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

@rootsongjc
rootsongjc merged commit 2c709a1 into Project-HAMi:master Aug 12, 2026
12 of 13 checks passed
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