Skip to content

Commit 2137c21

Browse files
committed
docs: add 5-minute quick start path (#412)
Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
1 parent ed362ac commit 2137c21

2 files changed

Lines changed: 127 additions & 0 deletions

File tree

docs/get-started/quick-start.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: 5-Minute Quick Start
3+
sidebar_label: Quick Start
4+
---
5+
6+
This guide gets HAMi running on an existing Kubernetes cluster with at least one NVIDIA GPU node in under 5 minutes. It uses a single Helm command for installation and one test pod to confirm GPU sharing works.
7+
8+
For production setups, offline installs, or non-NVIDIA devices, see the [Installation](../installation/online-installation) section.
9+
10+
## Prerequisites
11+
12+
- A running Kubernetes cluster (v1.18+)
13+
- At least one GPU node with NVIDIA drivers (v440+) and `nvidia-container-toolkit` installed and set as the default container runtime
14+
- Helm v3+
15+
- `kubectl` configured to reach the cluster
16+
17+
:::note
18+
The node runtime must already be configured before installing HAMi. If it is not, follow the [Prerequisites](../installation/prerequisites) guide first, then return here.
19+
:::
20+
21+
## Step 1 - Install HAMi
22+
23+
Add the HAMi Helm repository:
24+
25+
```bash
26+
helm repo add hami-charts https://project-hami.github.io/HAMi/
27+
helm repo update
28+
```
29+
30+
Get your Kubernetes server version:
31+
32+
```bash
33+
kubectl version
34+
```
35+
36+
Look for the `Server Version` line in the output. Install HAMi, replacing `v1.XX.X` with that version:
37+
38+
```bash
39+
helm install hami hami-charts/hami \
40+
--set scheduler.kubeScheduler.imageTag=v1.XX.X \
41+
-n kube-system
42+
```
43+
44+
Label each GPU node so HAMi can schedule workloads onto it. Replace `<node-name>` with the output of `kubectl get nodes`:
45+
46+
```bash
47+
kubectl label nodes <node-name> gpu=on
48+
```
49+
50+
## Step 2 - Verify HAMi is running
51+
52+
```bash
53+
kubectl get pods -n kube-system | grep hami
54+
```
55+
56+
Expected output:
57+
58+
```text
59+
hami-device-plugin-<hash> 1/1 Running 0 1m
60+
hami-scheduler-<hash> 1/1 Running 0 1m
61+
```
62+
63+
Both pods must reach `Running` state before submitting workloads. If they do not, check the [Validate HAMi](./verify-hami) guide for troubleshooting steps.
64+
65+
## Step 3 - Run a GPU sharing example
66+
67+
The following pod requests one virtual GPU with a 4096 MiB memory cap. Two such pods can share a single physical GPU simultaneously.
68+
69+
```bash
70+
kubectl apply -f - <<EOF
71+
apiVersion: v1
72+
kind: Pod
73+
metadata:
74+
name: hami-quick-test
75+
spec:
76+
containers:
77+
- name: test
78+
image: ubuntu:22.04
79+
command: ["bash", "-c", "sleep 86400"]
80+
resources:
81+
limits:
82+
nvidia.com/gpu: 1
83+
nvidia.com/gpumem: 4096
84+
EOF
85+
```
86+
87+
Wait for the pod to be ready:
88+
89+
```bash
90+
kubectl wait --for=condition=Ready pod/hami-quick-test --timeout=120s
91+
```
92+
93+
## Step 4 - Confirm memory isolation
94+
95+
Run `nvidia-smi` inside the pod:
96+
97+
```bash
98+
kubectl exec -it hami-quick-test -- nvidia-smi
99+
```
100+
101+
Expected output (truncated):
102+
103+
```text
104+
[HAMI-core Msg(...)]: Initializing.....
105+
+-----------------------------------------------------------------------------------------+
106+
| NVIDIA-SMI ... |
107+
|=========================================+========================+======================|
108+
| 0 <GPU model> On | ... | 0 |
109+
| | 0MiB / 4096MiB | 0% Default |
110+
+-----------------------------------------+------------------------+----------------------+
111+
```
112+
113+
The `Total Memory` column shows `4096MiB`, not the full physical GPU memory. This confirms HAMi is enforcing the virtual GPU memory limit.
114+
115+
## Cleanup
116+
117+
```bash
118+
kubectl delete pod hami-quick-test
119+
```
120+
121+
## Next steps
122+
123+
- [Online Installation](../installation/online-installation) - full Helm options, custom values
124+
- [Validate HAMi](./verify-hami) - deeper validation including native GPU stack checks
125+
- [Configure HAMi](../userguide/configure) - resource limits, scheduling policies, and more
126+
- [Device Sharing](../key-features/device-sharing) - how GPU sharing works under the hood

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ module.exports = {
4040
"description": "Install and run HAMi quickly with a guided first deployment path."
4141
},
4242
"items": [
43+
"get-started/quick-start",
4344
"get-started/deploy-with-helm",
4445
"get-started/verify-hami"
4546
]

0 commit comments

Comments
 (0)