Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ import LabCardGridAuto from '@site/src/components/labs/LabCardGridAuto';

<LabCardGridAuto />

每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。
每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。实验 7 在租用的 GPU 虚拟机上自行搭建单节点 k3s 集群,不使用 GPU Operator。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

将实验列表和后面的说明拆成独立段落。

LabCardGridAuto 会渲染成块级元素,和说明文字写在同一行会导致 MDX 结构不够稳妥。请把后面的说明单独放到一个段落里。

♻️ Proposed fix
-<LabCardGridAuto />
-每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。实验 7 在租用的 GPU 虚拟机上自行搭建单节点 k3s 集群,不使用 GPU Operator。
+<LabCardGridAuto />
+
+每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。实验 7 在租用的 GPU 虚拟机上自行搭建单节点 k3s 集群,不使用 GPU Operator。
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。实验 7 在租用的 GPU 虚拟机上自行搭建单节点 k3s 集群,不使用 GPU Operator。
每个实验都列出了各自的前提条件。实验 3 和 4 直接复用实验 1 搭建的集群,一次开机即可完成全部三个实验;实验 2 可在任意笔记本上运行,无需 GPU。实验 7 在租用的 GPU 虚拟机上自行搭建单节点 k3s 集群,不使用 GPU Operator。
🤖 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/overview.md` at line
22, The lab list and the following explanatory text are currently in the same
paragraph, which is fragile for the block-level LabCardGridAuto rendering.
Update the overview content so the experiment list remains one paragraph and
move the trailing explanation about experiments 3, 4, 2, and 7 into its own
separate paragraph in the same MDX section.

Source: Linked repositories

5 changes: 5 additions & 0 deletions sidebars-tutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ module.exports = {
id: "labs/hami-vllm",
customProps: { level: "Intermediate", duration: "about 45 minutes" },
},
{
type: "doc",
id: "labs/hami-isolation-k3s",
customProps: { level: "Intermediate", duration: "about 45 minutes" },
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# A third Pod whose memory slice fits the card when it is empty, but NOT alongside
# the two 8000 MiB slices that hami-share-a / hami-share-b already hold. It stays
# Pending with CardInsufficientMemory - proving the device plugin and scheduler
# account the card's memory as one shared, finite budget.
#
# Apply this ONLY after hami-share-a and hami-share-b are Running.
#
# Sizing (IMPORTANT - adjust for your card): set gpumem ABOVE (card_total - 2*slice)
# so it cannot fit beside the two slices, and BELOW card_total so it WOULD fit on an
# empty card. 90000 MiB works for a 96 GB RTX PRO 6000 (97887 MiB) with two 8000 MiB
# slices held (~82000 free). For a 48 GB card use ~45000; for a 24 GB card with two
# 4000 MiB slices, use ~20000.
# Read the card size first:
# kubectl exec hami-share-a -- nvidia-smi --query-gpu=memory.total --format=csv
apiVersion: v1
kind: Pod
metadata:
name: hami-oversubscribe
spec:
restartPolicy: Never
containers:
- name: cuda
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
command: ["bash", "-c", "nvidia-smi; sleep infinity"]
resources:
limits:
nvidia.com/gpu: 1
nvidia.com/gpumem: 90000
35 changes: 35 additions & 0 deletions tutorials/labs/examples/07-hami-isolation-k3s/share-two-pods.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Two Pods, each asking for one physical GPU and an 8000 MiB memory slice. On a
# 96 GB RTX PRO 6000 (or a 48 GB A6000) both fit with plenty of headroom, so both
# land on the one GPU. On a 24 GB card use ~4000 MiB instead.
#
# The image is the CUDA devel image because the memory probe compiles a tiny CUDA
# allocator with nvcc inside the Pod. It is large to pull; that is expected.
apiVersion: v1
kind: Pod
metadata:
name: hami-share-a
spec:
restartPolicy: Never
containers:
- name: cuda
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
command: ["bash", "-c", "nvidia-smi; sleep infinity"]
resources:
limits:
nvidia.com/gpu: 1
nvidia.com/gpumem: 8000
---
apiVersion: v1
kind: Pod
metadata:
name: hami-share-b
spec:
restartPolicy: Never
containers:
- name: cuda
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
command: ["bash", "-c", "nvidia-smi; sleep infinity"]
resources:
limits:
nvidia.com/gpu: 1
nvidia.com/gpumem: 8000
Loading