Skip to content

docs: update GPU partitioning manifests for AWS EC2 - #757

Open
Creativeklvn wants to merge 1 commit into
Project-HAMi:masterfrom
Creativeklvn:lab-3
Open

docs: update GPU partitioning manifests for AWS EC2 #757
Creativeklvn wants to merge 1 commit into
Project-HAMi:masterfrom
Creativeklvn:lab-3

Conversation

@Creativeklvn

@Creativeklvn Creativeklvn commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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

  • Added instructions for copying the GPU partitioning example YAML manifests from the local machine to the AWS EC2 instance using scp.
  • Updated the kubectl apply commands to use the manifests from their location on the EC2 instance.
  • Clarified the difference between the AWS and GCP workflows.
  • Kept the existing GCP workflow unchanged, since the HAMi repository and example manifests are available directly on the GCP VM.

Why did we need it

The previous instructions assumed that the HAMi repository and YAML manifests were available on the same machine where kubectl was being executed. This is not the case in the AWS EC2 setup, where the repository is typically on the user's local machine while kubectl is 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

  • Documentation
    • Added tabbed GPU partitioning instructions for AWS and GCP workflows.
    • Clarified AWS steps for copying manifests to an EC2 instance before deployment.
    • Improved out-of-memory verification examples with completed pod status and detailed error output.
    • Added optional instructions for accessing the HAMi WebUI through port forwarding.

@hami-robot

hami-robot Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for project-hami ready!

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

📝 Walkthrough

Walkthrough

The 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.

Changes

GPU partitioning lab documentation

Layer / File(s) Summary
Provider-specific manifest application
tutorials/labs/gpu-partitioning.md
Adds Docusaurus tabs. AWS instructions copy manifests to EC2 before applying them. GCP instructions apply manifests from the repository path.
OOM verification
tutorials/labs/gpu-partitioning.md
Adds Pod completion status and detailed HAMi-core allocation errors to the expected output.
Compute checks and WebUI access
tutorials/labs/gpu-partitioning.md
Adds AWS compute-test file transfer steps, gpucores-pod checks, and optional HAMi WebUI port forwarding through the VM public IP.

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

Possibly related PRs

  • Project-HAMi/website#737: Updates related HAMi GPU tutorial documentation with provider-specific workflows and WebUI guidance.

Suggested labels: kind/documentation

Suggested reviewers: rootsongjc, archlitchi

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The OOM output updates and optional HAMi WebUI port-forwarding instructions are unrelated to the linked issue. Move the OOM verification and HAMi WebUI instructions to a separate pull request or link them to additional scope.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main documentation change for AWS EC2 GPU partitioning manifests.
Linked Issues check ✅ Passed The AWS instructions copy manifests to EC2 and apply them remotely, which addresses issue #756.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 added the kind/documentation Improvements or additions to documentation label Aug 11, 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: 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

📥 Commits

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

📒 Files selected for processing (1)
  • tutorials/labs/gpu-partitioning.md

Comment on lines +100 to +111
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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.”

Comment thread tutorials/labs/gpu-partitioning.md
Comment thread tutorials/labs/gpu-partitioning.md
Comment thread tutorials/labs/gpu-partitioning.md Outdated
Comment on lines +277 to +282
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.”

Comment on lines +427 to +434
(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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 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-system

Access 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>

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

♻️ Duplicate comments (2)
tutorials/labs/gpu-partitioning.md (2)

102-108: ⚠️ Potential issue | 🟠 Major

Duplicate: use the defined AWS connection values in every scp command.

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 | 🟠 Major

Duplicate: keep the WebUI port forward private.

--address 0.0.0.0 binds port 3000 on every VM interface. Line [433] then directs users to the public IP. Use localhost binding with an SSH -L tunnel, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6cd118e and 8537e9d.

📒 Files selected for processing (1)
  • tutorials/labs/gpu-partitioning.md

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

Labels

area/docs dco-signoff: yes kind/documentation Improvements or additions to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GPU Partitioning Lab 3 Instructions for AWS EC2 Manifest Files

1 participant