docs: update GPU partitioning manifests for AWS EC2 - #757
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Creativeklvn The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for project-hami ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe GPU partitioning lab now uses AWS and GCP tabs for manifest workflows. AWS instructions copy manifests to EC2. The lab also expands OOM verification, adds compute-Pod checks, and documents optional HAMi WebUI port forwarding. ChangesGPU partitioning lab documentation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 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/gpu-partitioning.md`:
- Around line 102-109: Update all three AWS copy commands in the tutorial to use
the `NODE_PUBLIC_IP` variable instead of the hardcoded `15.236.203.204` host,
and consistently use the exact PEM path established in Step 1.3
(`~/Downloads/hami-eks.pem`).
- Around line 100-111: Correct the repeated terminal instructions in all
affected sections: change “seperate” to “separate” and replace “Go back to your
on EC2 terminal” with “Return to the EC2 terminal.”
- Around line 136-137: Add a blank line between each provider-tab fenced code
block’s closing fence and the following </TabItem> in the tutorial, including
the block near the reported location, so the repeated pattern satisfies
Markdownlint MD031.
- Around line 277-282: Update the expected OOM output in the tutorial to use
ellipses or placeholders for the variable process ID, thread ID, allocator
details, memory values, and repeated HAMi-core error count. Preserve stable
assertions such as “Hit the limit after ...” and “CUDA out of memory.”
- Around line 427-434: Update the WebUI access instructions to remove the
default kubectl port-forward binding to 0.0.0.0 and use localhost binding
through an SSH -L tunnel instead. Keep the WebUI reachable via the remote
machine without exposing port 3000 on all VM interfaces; if public access
remains documented, restrict it to the student’s IP and include authentication
and HTTP-exposure requirements.
🪄 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: 2d36983c-2a59-49e3-841b-c732edcbf5df
📒 Files selected for processing (1)
tutorials/labs/gpu-partitioning.md
| Open a seperate terminal. | ||
|
|
||
| Use the same PEM key file and `NODE_PUBLIC_IP` defined in **Step 1.3: SSH Into the Instance** to copy the YAML files to the EC2 instance. | ||
|
|
||
| ```bash | ||
| scp -i ~/Downloads/hami-eks.pem \ | ||
| tutorials/labs/examples/03-gpu-partitioning/gpumem-pod-a.yaml \ | ||
| tutorials/labs/examples/03-gpu-partitioning/gpumem-pod-b.yaml \ | ||
| ubuntu@15.236.203.204:/home/ubuntu/ | ||
| ``` | ||
|
|
||
| Go back to your on EC2 terminal. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the repeated terminal instructions.
Replace seperate with separate. Replace Go back to your on EC2 terminal with Return to the EC2 terminal.
Also applies to: 219-229, 323-333
🤖 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/gpu-partitioning.md` around lines 100 - 111, Correct the
repeated terminal instructions in all affected sections: change “seperate” to
“separate” and replace “Go back to your on EC2 terminal” with “Return to the EC2
terminal.”
| Allocated 2048 MiB | ||
| Allocated 2560 MiB | ||
| Allocated 3072 MiB | ||
| Allocated 3584 MiB | ||
| [HAMI-core ERROR (pid:1 thread=... allocator.c:52)]: Device 0 OOM 4399824896 / 4194304000 | ||
| [HAMI-core ERROR (pid:1 thread=128984570163776 allocator.c:52)]: Device 0 OOM 4399824896 / 4194304000 | ||
| [HAMI-core ERROR (pid:1 thread=128984570163776 allocator.c:52)]: Device 0 OOM 4399824896 / 4194304000 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use stable placeholders for the OOM output.
The process ID, thread ID, allocator details, and number of repeated HAMi-core errors can vary between runs. A valid result can therefore differ from this exact output. Use ellipses or placeholders, and keep stable checks such as Hit the limit after ... and CUDA out of memory.
🤖 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/gpu-partitioning.md` around lines 277 - 282, Update the
expected OOM output in the tutorial to use ellipses or placeholders for the
variable process ID, thread ID, allocator details, memory values, and repeated
HAMi-core error count. Preserve stable assertions such as “Hit the limit after
...” and “CUDA out of memory.”
| (Optional) Access the WebUI via port forwarding: | ||
|
|
||
| ```bash | ||
| kubectl port-forward --address 0.0.0.0 service/my-hami-webui 3000:3000 --namespace=kube-system | ||
| ``` | ||
|
|
||
| Visit `http://<your-vm-public-ip-address>:3000` to open the HAMi WebUI. | ||
|
|
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not expose the WebUI on all VM interfaces by default.
--address 0.0.0.0 binds the port forward to every EC2 interface. The public-IP URL then requires an inbound security-group rule and exposes port 3000 to every source allowed by that rule. Prefer an SSH tunnel with localhost binding. If public access is required, restrict the rule to the student's IP and document the authentication and HTTP exposure.
Safer default
-kubectl port-forward --address 0.0.0.0 service/my-hami-webui 3000:3000 --namespace=kube-system
+kubectl port-forward service/my-hami-webui 3000:3000 --namespace=kube-systemAccess the remote port through an SSH -L tunnel.
🧰 Tools
🪛 LanguageTool
[grammar] ~433-~433: Ensure spelling is correct
Context: ...blic-ip-address>:3000` to open the HAMi WebUI. ## Step 6: Cleanup ```bash kubectl delete ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 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/gpu-partitioning.md` around lines 427 - 434, Update the WebUI
access instructions to remove the default kubectl port-forward binding to
0.0.0.0 and use localhost binding through an SSH -L tunnel instead. Keep the
WebUI reachable via the remote machine without exposing port 3000 on all VM
interfaces; if public access remains documented, restrict it to the student’s IP
and include authentication and HTTP-exposure requirements.
Signed-off-by: Kelvin Uneze <kelvinuneze@gmail.com>
There was a problem hiding this comment.
♻️ Duplicate comments (2)
tutorials/labs/gpu-partitioning.md (2)
102-108:⚠️ Potential issue | 🟠 MajorDuplicate: use the defined AWS connection values in every
scpcommand.All three commands use placeholders instead of the values established in Step 1.3.
tutorials/labs/gpu-partitioning.md#L102-L108: use the exact PEM path and"$NODE_PUBLIC_IP".tutorials/labs/gpu-partitioning.md#L222-L227: use the exact PEM path and"$NODE_PUBLIC_IP".tutorials/labs/gpu-partitioning.md#L325-L330: use the exact PEM path and"$NODE_PUBLIC_IP".🤖 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/gpu-partitioning.md` around lines 102 - 108, Update the scp commands at tutorials/labs/gpu-partitioning.md lines 102-108, 222-227, and 325-330 to reuse the exact PEM key path established in Step 1.3 and target "$NODE_PUBLIC_IP" instead of placeholders. Apply the same connection values consistently at all three sites.
430-433:⚠️ Potential issue | 🟠 MajorDuplicate: keep the WebUI port forward private.
--address 0.0.0.0binds port 3000 on every VM interface. Line [433] then directs users to the public IP. Use localhost binding with an SSH-Ltunnel, or document a restricted security-group source, authentication, and HTTP exposure.🤖 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/gpu-partitioning.md` around lines 430 - 433, Update the WebUI access instructions around the kubectl port-forward command to avoid exposing port 3000 on all VM interfaces. Bind the port forward to localhost and document an SSH -L tunnel for accessing it, or provide equivalent restricted security-group, authentication, and HTTP-exposure guidance instead of directing users to the VM public IP directly.
🤖 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.
Duplicate comments:
In `@tutorials/labs/gpu-partitioning.md`:
- Around line 102-108: Update the scp commands at
tutorials/labs/gpu-partitioning.md lines 102-108, 222-227, and 325-330 to reuse
the exact PEM key path established in Step 1.3 and target "$NODE_PUBLIC_IP"
instead of placeholders. Apply the same connection values consistently at all
three sites.
- Around line 430-433: Update the WebUI access instructions around the kubectl
port-forward command to avoid exposing port 3000 on all VM interfaces. Bind the
port forward to localhost and document an SSH -L tunnel for accessing it, or
provide equivalent restricted security-group, authentication, and HTTP-exposure
guidance instead of directing users to the VM public IP directly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 103be920-3728-4ef0-acd1-ced6e49dbf1e
📒 Files selected for processing (1)
tutorials/labs/gpu-partitioning.md
Updates the GPU partitioning lab instructions to ensure the example YAML manifests are available on the AWS EC2 instance before they are applied with
kubectl.Changes
scp.kubectl applycommands to use the manifests from their location on the EC2 instance.Why did we need it
The previous instructions assumed that the HAMi repository and YAML manifests were available on the same machine where
kubectlwas being executed. This is not the case in the AWS EC2 setup, where the repository is typically on the user's local machine whilekubectlis run on the remote EC2 instance.This update ensures the GPU partitioning lab can be followed successfully on AWS without changing the existing GCP instructions.
fixes: #756
Summary by CodeRabbit