From 1eedf07f27880c9f30707f77a2354307e14761db Mon Sep 17 00:00:00 2001 From: Srijan Date: Mon, 3 Aug 2026 20:30:33 +0530 Subject: [PATCH 1/2] docs(get-started): simplify quick start and online installation guides Signed-off-by: Srijan --- docs/get-started/deploy-with-helm.md | 153 ++++------------ docs/installation/online-installation.md | 28 +-- .../current/get-started/deploy-with-helm.md | 161 +++++------------ .../installation/online-installation.md | 28 +-- .../get-started/deploy-with-helm.md | 163 ++++++------------ .../installation/online-installation.md | 29 ++-- .../get-started/deploy-with-helm.md | 157 +++++------------ .../installation/online-installation.md | 28 +-- 8 files changed, 236 insertions(+), 511 deletions(-) diff --git a/docs/get-started/deploy-with-helm.md b/docs/get-started/deploy-with-helm.md index dc54192c3..4d2f15d6e 100644 --- a/docs/get-started/deploy-with-helm.md +++ b/docs/get-started/deploy-with-helm.md @@ -1,110 +1,36 @@ --- -title: Deploy HAMi using Helm +title: Quick Start +sidebar_label: Get Started +translated: true --- -This guide covers: - -- Configuring NVIDIA container runtime on each GPU node -- Deploying HAMi using Helm -- Launching a vGPU task -- Verifying container resource limits +Get HAMi up and running in minutes by deploying the Helm chart and submitting your first shared GPU workload. ## Prerequisites {#prerequisites} +Before deploying HAMi, ensure your GPU nodes meet the following prerequisites: + - [Helm](https://helm.sh/docs/) v3+ - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA Driver](https://www.nvidia.cn/drivers/unix/) v440+ +- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (with `nvidia-container-runtime` configured as the container runtime) -## Installation {#installation} - -### 1. Configure nvidia-container-toolkit {#configure-nvidia-container-toolkit} - -Perform the following steps on all GPU nodes. - -This guide assumes that NVIDIA drivers and the `nvidia-container-toolkit` are already installed, and that `nvidia-container-runtime` is set as the default low-level runtime. - -See [nvidia-container-toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html). - -The following example applies to Debian-based systems using Docker or containerd: - -#### Install the `nvidia-container-toolkit` {#install-the-nvidia-container-toolkit} - -```bash -curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - -sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit -``` - -#### Configure Docker {#configure-docker} - -When running Kubernetes with Docker, edit the configuration file (usually `/etc/docker/daemon.json`) to set `nvidia-container-runtime` as the default runtime: - -```json -{ - "default-runtime": "nvidia", - "runtimes": { - "nvidia": { - "path": "/usr/bin/nvidia-container-runtime", - "runtimeArgs": [] - } - } -} -``` - -Restart Docker: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart docker -``` - -#### Configure containerd {#configure-containerd} - -When using Kubernetes with containerd, modify the configuration file (usually `/etc/containerd/config.toml`) to set `nvidia-container-runtime` as the default runtime: - -```toml -version = 2 -[plugins] - [plugins."io.containerd.grpc.v1.cri"] - [plugins."io.containerd.grpc.v1.cri".containerd] - default_runtime_name = "nvidia" - - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes] - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia] - privileged_without_host_devices = false - runtime_engine = "" - runtime_root = "" - runtime_type = "io.containerd.runc.v2" - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options] - BinaryName = "/usr/bin/nvidia-container-runtime" -``` - -Restart containerd: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart containerd -``` +--- -### 2. Label your nodes {#label-your-nodes} +## 1. Label your nodes {#label-your-nodes} -Label your GPU nodes for HAMi scheduling with `gpu=on`. Nodes without this label cannot be managed by the scheduler. +Label the target GPU nodes with `gpu=on`. Nodes without this label will not be managed by HAMi: ```bash kubectl label nodes gpu=on ``` -### 3. Deploy HAMi using Helm {#deploy-hami-using-helm} - -Check your Kubernetes version: +--- -```bash -kubectl version -``` +## 2. Deploy HAMi using Helm {#deploy-hami-using-helm} -Add the Helm repository: +Add the official HAMi Helm repository and deploy the chart: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ @@ -112,13 +38,17 @@ helm repo update helm install hami hami-charts/hami -n kube-system ``` -If successful, both `hami-device-plugin` and `hami-scheduler` pods should be in the `Running` state. +Verify that the `hami-scheduler` and `hami-device-plugin` pods are running: + +```bash +kubectl get pods -n kube-system | grep hami +``` -## Demo {#demo} +--- -### 1. Submit demo task {#submit-demo-task} +## 3. Submit a vGPU Workload {#submit-a-vgpu-workload} -Containers can now request NVIDIA vGPUs using the `nvidia.com/gpu` resource type. +Create a Pod requesting 1 vGPU with 10240 MiB of GPU memory limit: ```yaml apiVersion: v1 @@ -132,59 +62,48 @@ spec: command: ["bash", "-c", "sleep 86400"] resources: limits: - nvidia.com/gpu: 1 # Request 1 vGPU - nvidia.com/gpumem: 10240 # Each vGPU provides 10240 MiB device memory (optional) + nvidia.com/gpu: 1 + nvidia.com/gpumem: 10240 ``` -Wait for the pod to be ready: +Apply the manifest and wait for the Pod to become ready: ```bash +kubectl apply -f gpu-pod.yaml kubectl wait --for=condition=Ready pod/gpu-pod --timeout=120s ``` -### 2. Verify container resource limits {#verify-in-container-resource-control} +--- + +## 4. Verify GPU Memory Isolation {#verify-gpu-memory-isolation} -Run the following command: +Execute `nvidia-smi` inside the running container: ```bash kubectl exec -it gpu-pod -- nvidia-smi ``` -Expected output: +Expected output showing HAMi-core hard memory limit (`10240MiB`): ```text -[HAMI-core Msg(28:140561996502848:libvgpu.c:836)]: Initializing..... -Wed Apr 10 09:28:58 2024 +[HAMI-core Msg]: Initializing..... +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | -| | | MIG M. | |=========================================+========================+======================| | 0 Tesla V100-PCIE-32GB On | 00000000:3E:00.0 Off | 0 | | N/A 29C P0 24W / 250W | 0MiB / 10240MiB | 0% Default | -| | | N/A | -+-----------------------------------------+------------------------+----------------------+ - -+-----------------------------------------------------------------------------------------+ -| Processes: | -| GPU GI CI PID Type Process name GPU Memory | -| ID ID Usage | -|=========================================================================================| -| No running processes found | +-----------------------------------------------------------------------------------------+ -[HAMI-core Msg(28:140561996502848:multiprocess_memory_limit.c:434)]: Calling exit handler 28 ``` -## Cleanup +--- + +## Cleanup {#cleanup} + +Delete the test Pod: ```bash kubectl delete pod gpu-pod ``` - -## Next steps - -- [Validate HAMi](./verify-hami) - deeper validation including native GPU stack checks -- [Configure HAMi](../userguide/configure) - resource limits, scheduling policies, and more -- [Device Sharing](../key-features/device-sharing) - how GPU sharing works under the hood diff --git a/docs/installation/online-installation.md b/docs/installation/online-installation.md index a5375b948..0d0a6252b 100644 --- a/docs/installation/online-installation.md +++ b/docs/installation/online-installation.md @@ -3,41 +3,41 @@ sidebar_label: Online Installation from Helm title: Online Installation from Helm (Recommended) --- -The recommended way to deploy HAMi is via Helm. +The recommended way to deploy HAMi in a Kubernetes cluster is via the official Helm chart. -## Add HAMi repo +## 1. Add HAMi Helm Repository {#add-hami-repo} -You can add HAMi chart repository using the following command: +Add the HAMi chart repository and update local repository cache: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ helm repo update ``` -## Get your Kubernetes version +## 2. Deploy HAMi {#deploy-hami} -A Kubernetes version is required for proper installation. You can retrieve your Kubernetes server version with: +Deploy HAMi into the `kube-system` namespace using standard Helm installation: ```bash -kubectl version +helm install hami hami-charts/hami -n kube-system ``` -## Installation +### Customizing Helm Configurations -Ensure the `scheduler.kubeScheduler.image.tag` matches your Kubernetes server version. For instance, if your cluster server is v1.29.0, use the following command to deploy: +You can customize your deployment by passing parameters with `--set` or providing a custom `values.yaml` file: ```bash -helm install hami hami-charts/hami --set scheduler.kubeScheduler.image.tag=v1.29.0 -n kube-system +helm install hami hami-charts/hami -n kube-system -f custom-values.yaml ``` -Customize your installation by editing the [configurations](../userguide/configure.md). +For a detailed breakdown of available chart options and configuration keys, see the [Configuration Guide](../userguide/configure.md). -## Verify your installation +## 3. Verify Installation {#verify-installation} -You can verify your installation using the following command: +Verify that the HAMi components (`hami-device-plugin` and `hami-scheduler`) are running correctly: ```bash -kubectl get pods -n kube-system +kubectl get pods -n kube-system | grep hami ``` -If both hami-device-plugin and hami-scheduler pods are in the Running state, your installation is successful. +If both `hami-device-plugin` and `hami-scheduler` pods are in the `Running` state, your installation is successful. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md b/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md index ae700991a..b073f0783 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md @@ -1,130 +1,54 @@ --- -title: 使用 Helm 部署 HAMi +title: 快速开始 +sidebar_label: 快速开始 +translated: true --- -本指南将涵盖: - -- 为每个 GPU 节点配置 NVIDIA 容器运行时 -- 使用 Helm 部署 HAMi -- 启动 vGPU 任务 -- 验证容器内设备资源是否受限 +只需几分钟,即可通过部署 Helm Chart 并提交您的第一个 GPU 共享工作负载快速上手 HAMi。 ## 先决条件 {#prerequisites} +在部署 HAMi 之前,请确保您的 GPU 节点满足以下前置条件: + - [Helm](https://helm.sh/zh/docs/) v3+ - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA 驱动](https://www.nvidia.cn/drivers/unix/) v440+ +- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) -## 安装步骤 {#installation} - -### 1. 配置 nvidia-container-toolkit {#configure-nvidia-container-toolkit} - -在所有 GPU 节点执行此操作。 - -本文假设已预装 NVIDIA 驱动和 `nvidia-container-toolkit`,并已将 `nvidia-container-runtime` 配置为默认底层运行时。 - -参考:[nvidia-container-toolkit 安装指南](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) - -以下是基于 Debian 系统(使用 Docker 和 containerd)的示例: - -#### 安装 `nvidia-container-toolkit` {#install-the-nvidia-container-toolkit} - -```bash -curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - -sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit -``` - -#### 配置 Docker {#configure-docker} - -当使用 Docker 运行 Kubernetes 时,编辑配置文件(通常位于 `/etc/docker/daemon.json`),将 `nvidia-container-runtime` 设为默认底层运行时: - -```json -{ - "default-runtime": "nvidia", - "runtimes": { - "nvidia": { - "path": "/usr/bin/nvidia-container-runtime", - "runtimeArgs": [] - } - } -} -``` - -然后重启 Docker: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart docker -``` - -#### 配置 containerd {#configure-containerd} - -当使用 containerd 运行 Kubernetes 时,修改配置文件(通常位于 `/etc/containerd/config.toml`),将 `nvidia-container-runtime` 设为默认底层运行时: - -```toml -version = 2 -[plugins] - [plugins."io.containerd.grpc.v1.cri"] - [plugins."io.containerd.grpc.v1.cri".containerd] - default_runtime_name = "nvidia" - - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes] - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia] - privileged_without_host_devices = false - runtime_engine = "" - runtime_root = "" - runtime_type = "io.containerd.runc.v2" - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options] - BinaryName = "/usr/bin/nvidia-container-runtime" -``` - -然后重启 containerd: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart containerd -``` +--- -### 2. 标记节点 {#label-your-nodes} +## 1. 标记节点 {#label-your-nodes} -通过添加 "gpu=on" 标签将 GPU 节点标记为可调度 HAMi 任务。未标记的节点将无法被调度器管理。 +使用 `gpu=on` 标签标记目标 GPU 节点。未标记的节点将不会由 HAMi 管理: ```bash kubectl label nodes gpu=on ``` -### 3. 使用 Helm 部署 HAMi {#deploy-hami-using-helm} - -首先通过以下命令确认 Kubernetes 版本: +--- -```bash -kubectl version -``` +## 2. 使用 Helm 部署 HAMi {#deploy-hami-using-helm} -然后添加 Helm 仓库: +添加官方 HAMi Helm 仓库并进行部署: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ +helm repo update +helm install hami hami-charts/hami -n kube-system ``` -安装时需设置 Kubernetes 调度器镜像版本与集群版本匹配。例如集群版本为 1.16.8 时,使用以下命令部署: +确认 `hami-scheduler` 和 `hami-device-plugin` 的 Pod 处于 `Running` 状态: ```bash -helm install hami hami-charts/hami \ - --set scheduler.kubeScheduler.image.tag=v1.16.8 \ - -n kube-system +kubectl get pods -n kube-system | grep hami ``` -若一切正常,可见 vgpu-device-plugin 和 vgpu-scheduler 的 Pod 均处于 Running 状态。 - -## 演示 {#demo} +--- -### 1. 提交演示任务 {#submit-demo-task} +## 3. 提交 vGPU 工作负载 {#submit-a-vgpu-workload} -容器现在可通过 `nvidia.com/gpu` 资源类型申请 NVIDIA vGPU: +创建一个申请 1 个 vGPU 及 10240 MiB 显存限制的 Pod: ```yaml apiVersion: v1 @@ -134,45 +58,52 @@ metadata: spec: containers: - name: ubuntu-container - image: ubuntu:18.04 + image: ubuntu:22.04 command: ["bash", "-c", "sleep 86400"] resources: limits: - nvidia.com/gpu: 1 # 申请 1 个 vGPU - nvidia.com/gpumem: 10240 # 每个 vGPU 包含 10240m 设备显存(可选,整型) + nvidia.com/gpu: 1 + nvidia.com/gpumem: 10240 +``` + +提交 YAML 并等待 Pod 启动完毕: + +```bash +kubectl apply -f gpu-pod.yaml +kubectl wait --for=condition=Ready pod/gpu-pod --timeout=120s ``` -### 2. 验证容器内资源限制 {#verify-in-container-resource-control} +--- + +## 4. 验证 GPU 显存隔离 {#verify-gpu-memory-isolation} -执行查询命令: +在运行的容器中执行 `nvidia-smi`: ```bash kubectl exec -it gpu-pod -- nvidia-smi ``` -预期输出: +预期输出显示 HAMi-core 的显存硬限制 (`10240MiB`): ```text -[HAMI-core Msg(28:140561996502848:libvgpu.c:836)]: Initializing..... -Wed Apr 10 09:28:58 2024 +[HAMI-core Msg]: Initializing..... +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | -| | | MIG M. | |=========================================+========================+======================| | 0 Tesla V100-PCIE-32GB On | 00000000:3E:00.0 Off | 0 | | N/A 29C P0 24W / 250W | 0MiB / 10240MiB | 0% Default | -| | | N/A | -+-----------------------------------------+------------------------+----------------------+ - -+-----------------------------------------------------------------------------------------+ -| Processes: | -| GPU GI CI PID Type Process name GPU Memory | -| ID ID Usage | -|=========================================================================================| -| No running processes found | +-----------------------------------------------------------------------------------------+ -[HAMI-core Msg(28:140561996502848:multiprocess_memory_limit.c:434)]: Calling exit handler 28 +``` + +--- + +## 清理资源 {#cleanup} + +删除测试 Pod: + +```bash +kubectl delete pod gpu-pod ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md b/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md index 290de6f06..ea4b4c176 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md @@ -4,41 +4,41 @@ title: 通过 Helm 在线安装(推荐) translated: true --- -推荐使用 Helm 部署 HAMi。 +在 Kubernetes 集群中部署 HAMi 的推荐方式是使用官方 Helm Chart。 -## 添加 HAMi 仓库 +## 1. 添加 HAMi Helm 仓库 {#add-hami-repo} -你可以使用以下命令添加 HAMi 图表仓库: +添加 HAMi Chart 仓库并更新本地仓库缓存: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ helm repo update ``` -## 获取你的 Kubernetes 版本 +## 2. 部署 HAMi {#deploy-hami} -安装时需要 Kubernetes 版本。你可以使用以下命令获取此信息: +使用标准 Helm 命令将 HAMi 部署至 `kube-system` 命名空间: ```bash -kubectl version +helm install hami hami-charts/hami -n kube-system ``` -## 安装 +### 自定义 Helm 配置 -确保 `scheduler.kubeScheduler.image.tag` 与你的 Kubernetes 服务器版本匹配。例如,如果你的集群服务器版本是 v1.29.0,请使用以下命令进行部署: +您可以通过 `--set` 参数或指定自定义 `values.yaml` 文件来自定义部署配置: ```bash -helm install hami hami-charts/hami --set scheduler.kubeScheduler.image.tag=v1.29.0 -n kube-system +helm install hami hami-charts/hami -n kube-system -f custom-values.yaml ``` -你可以通过编辑[配置](../userguide/configure.md)来自定义安装。 +详细的配置项说明请参阅 [配置指南](../userguide/configure.md)。 -## 验证你的安装 +## 3. 验证安装 {#verify-installation} -你可以使用以下命令验证你的安装: +验证 HAMi 组件(`hami-device-plugin` 与 `hami-scheduler`)是否正常运行: ```bash -kubectl get pods -n kube-system +kubectl get pods -n kube-system | grep hami ``` -如果 hami-device-plugin 和 hami-scheduler 这两个 Pod 都处于 Running 状态,则说明你的安装成功。 +若 `hami-device-plugin` 和 `hami-scheduler` 的 Pod 均处于 `Running` 状态,则安装完成。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md index b6089dfaf..b073f0783 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md @@ -1,110 +1,36 @@ --- -title: 使用 Helm 部署 HAMi +title: 快速开始 +sidebar_label: 快速开始 +translated: true --- -本指南将涵盖: - -- 为每个 GPU 节点配置 NVIDIA 容器运行时 -- 使用 Helm 部署 HAMi -- 启动 vGPU 任务 -- 验证容器内设备资源是否受限 +只需几分钟,即可通过部署 Helm Chart 并提交您的第一个 GPU 共享工作负载快速上手 HAMi。 ## 先决条件 {#prerequisites} +在部署 HAMi 之前,请确保您的 GPU 节点满足以下前置条件: + - [Helm](https://helm.sh/zh/docs/) v3+ -- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.16+ +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA 驱动](https://www.nvidia.cn/drivers/unix/) v440+ +- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) -## 安装步骤 {#installation} - -### 1. 配置 nvidia-container-toolkit {#configure-nvidia-container-toolkit} - -在所有 GPU 节点执行此操作。 - -本文假设已预装 NVIDIA 驱动和 `nvidia-container-toolkit`,并已将 `nvidia-container-runtime` 配置为默认底层运行时。 - -参考:[nvidia-container-toolkit 安装指南](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) - -以下是基于 Debian 系统(使用 Docker 和 containerd)的示例: - -#### 安装 `nvidia-container-toolkit` {#install-the-nvidia-container-toolkit} - -```bash -curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - -sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit -``` - -#### 配置 Docker {#configure-docker} - -当使用 Docker 运行 Kubernetes 时,编辑配置文件(通常位于 `/etc/docker/daemon.json`),将 `nvidia-container-runtime` 设为默认底层运行时: - -```json -{ - "default-runtime": "nvidia", - "runtimes": { - "nvidia": { - "path": "/usr/bin/nvidia-container-runtime", - "runtimeArgs": [] - } - } -} -``` - -然后重启 Docker: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart docker -``` - -#### 配置 containerd {#configure-containerd} - -当使用 containerd 运行 Kubernetes 时,修改配置文件(通常位于 `/etc/containerd/config.toml`),将 `nvidia-container-runtime` 设为默认底层运行时: - -```toml -version = 2 -[plugins] - [plugins."io.containerd.grpc.v1.cri"] - [plugins."io.containerd.grpc.v1.cri".containerd] - default_runtime_name = "nvidia" - - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes] - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia] - privileged_without_host_devices = false - runtime_engine = "" - runtime_root = "" - runtime_type = "io.containerd.runc.v2" - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options] - BinaryName = "/usr/bin/nvidia-container-runtime" -``` - -然后重启 containerd: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart containerd -``` +--- -### 2. 标记节点 {#label-your-nodes} +## 1. 标记节点 {#label-your-nodes} -通过添加 "gpu=on" 标签将 GPU 节点标记为可调度 HAMi 任务。未标记的节点将无法被调度器管理。 +使用 `gpu=on` 标签标记目标 GPU 节点。未标记的节点将不会由 HAMi 管理: ```bash -kubectl label nodes {节点ID} gpu=on +kubectl label nodes gpu=on ``` -### 3. 使用 Helm 部署 HAMi {#deploy-hami-using-helm} +--- -首先通过以下命令确认 Kubernetes 版本: +## 2. 使用 Helm 部署 HAMi {#deploy-hami-using-helm} -```bash -kubectl version -``` - -然后添加 Helm 仓库: +添加官方 HAMi Helm 仓库并进行部署: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ @@ -112,13 +38,17 @@ helm repo update helm install hami hami-charts/hami -n kube-system ``` -若一切正常,可见 vgpu-device-plugin 和 vgpu-scheduler 的 Pod 均处于 Running 状态。 +确认 `hami-scheduler` 和 `hami-device-plugin` 的 Pod 处于 `Running` 状态: -## 演示 {#demo} +```bash +kubectl get pods -n kube-system | grep hami +``` + +--- -### 1. 提交演示任务 {#submit-demo-task} +## 3. 提交 vGPU 工作负载 {#submit-a-vgpu-workload} -容器现在可通过 `nvidia.com/gpu` 资源类型申请 NVIDIA vGPU: +创建一个申请 1 个 vGPU 及 10240 MiB 显存限制的 Pod: ```yaml apiVersion: v1 @@ -128,45 +58,52 @@ metadata: spec: containers: - name: ubuntu-container - image: ubuntu:18.04 + image: ubuntu:22.04 command: ["bash", "-c", "sleep 86400"] resources: limits: - nvidia.com/gpu: 1 # 申请 1 个 vGPU - nvidia.com/gpumem: 10240 # 每个 vGPU 包含 10240m 设备显存(可选,整型) + nvidia.com/gpu: 1 + nvidia.com/gpumem: 10240 ``` -### 2. 验证容器内资源限制 {#verify-in-container-resource-control} +提交 YAML 并等待 Pod 启动完毕: -执行查询命令: +```bash +kubectl apply -f gpu-pod.yaml +kubectl wait --for=condition=Ready pod/gpu-pod --timeout=120s +``` + +--- + +## 4. 验证 GPU 显存隔离 {#verify-gpu-memory-isolation} + +在运行的容器中执行 `nvidia-smi`: ```bash -kubectl exec -it gpu-pod nvidia-smi +kubectl exec -it gpu-pod -- nvidia-smi ``` -预期输出: +预期输出显示 HAMi-core 的显存硬限制 (`10240MiB`): ```text -[HAMI-core Msg(28:140561996502848:libvgpu.c:836)]: Initializing..... -Wed Apr 10 09:28:58 2024 +[HAMI-core Msg]: Initializing..... +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | -| | | MIG M. | |=========================================+========================+======================| | 0 Tesla V100-PCIE-32GB On | 00000000:3E:00.0 Off | 0 | | N/A 29C P0 24W / 250W | 0MiB / 10240MiB | 0% Default | -| | | N/A | -+-----------------------------------------+------------------------+----------------------+ - -+-----------------------------------------------------------------------------------------+ -| Processes: | -| GPU GI CI PID Type Process name GPU Memory | -| ID ID Usage | -|=========================================================================================| -| No running processes found | +-----------------------------------------------------------------------------------------+ -[HAMI-core Msg(28:140561996502848:multiprocess_memory_limit.c:434)]: Calling exit handler 28 +``` + +--- + +## 清理资源 {#cleanup} + +删除测试 Pod: + +```bash +kubectl delete pod gpu-pod ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md index 53dfbcfb4..ea4b4c176 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md @@ -4,40 +4,41 @@ title: 通过 Helm 在线安装(推荐) translated: true --- -推荐使用 Helm 部署 HAMi。 +在 Kubernetes 集群中部署 HAMi 的推荐方式是使用官方 Helm Chart。 -## 添加 HAMi 仓库 +## 1. 添加 HAMi Helm 仓库 {#add-hami-repo} -你可以使用以下命令添加 HAMi 图表仓库: +添加 HAMi Chart 仓库并更新本地仓库缓存: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ +helm repo update ``` -## 获取你的 Kubernetes 版本 +## 2. 部署 HAMi {#deploy-hami} -安装时需要 Kubernetes 版本。你可以使用以下命令获取此信息: +使用标准 Helm 命令将 HAMi 部署至 `kube-system` 命名空间: ```bash -kubectl version --short +helm install hami hami-charts/hami -n kube-system ``` -## 安装 +### 自定义 Helm 配置 -确保 `scheduler.kubeScheduler.imageTag` 与你的 Kubernetes 服务器版本匹配。例如,如果你的集群服务器版本是 v1.16.8,请使用以下命令进行部署: +您可以通过 `--set` 参数或指定自定义 `values.yaml` 文件来自定义部署配置: ```bash -helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.16.8 -n kube-system +helm install hami hami-charts/hami -n kube-system -f custom-values.yaml ``` -你可以通过编辑[配置](../userguide/configure.md)来自定义安装。 +详细的配置项说明请参阅 [配置指南](../userguide/configure.md)。 -## 验证你的安装 +## 3. 验证安装 {#verify-installation} -你可以使用以下命令验证你的安装: +验证 HAMi 组件(`hami-device-plugin` 与 `hami-scheduler`)是否正常运行: ```bash -kubectl get pods -n kube-system +kubectl get pods -n kube-system | grep hami ``` -如果 hami-device-plugin 和 hami-scheduler 这两个 Pod 都处于 Running 状态,则说明你的安装成功。 +若 `hami-device-plugin` 和 `hami-scheduler` 的 Pod 均处于 `Running` 状态,则安装完成。 diff --git a/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md b/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md index 2f878dcef..4d2f15d6e 100644 --- a/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md +++ b/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md @@ -1,110 +1,36 @@ --- -title: Deploy HAMi using Helm +title: Quick Start +sidebar_label: Get Started +translated: true --- -This guide covers: - -- Configuring NVIDIA container runtime on each GPU node -- Deploying HAMi using Helm -- Launching a vGPU task -- Verifying container resource limits +Get HAMi up and running in minutes by deploying the Helm chart and submitting your first shared GPU workload. ## Prerequisites {#prerequisites} +Before deploying HAMi, ensure your GPU nodes meet the following prerequisites: + - [Helm](https://helm.sh/docs/) v3+ -- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.16+ +- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA Driver](https://www.nvidia.cn/drivers/unix/) v440+ +- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (with `nvidia-container-runtime` configured as the container runtime) -## Installation {#installation} - -### 1. Configure nvidia-container-toolkit {#configure-nvidia-container-toolkit} - -Perform the following steps on all GPU nodes. - -This guide assumes that NVIDIA drivers and the `nvidia-container-toolkit` are already installed, and that `nvidia-container-runtime` is set as the default low-level runtime. - -See [nvidia-container-toolkit installation guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html). - -The following example applies to Debian-based systems using Docker or containerd: - -#### Install the `nvidia-container-toolkit` {#install-the-nvidia-container-toolkit} - -```bash -curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ - && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - -sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit -``` - -#### Configure Docker {#configure-docker} - -When running Kubernetes with Docker, edit the configuration file (usually `/etc/docker/daemon.json`) to set `nvidia-container-runtime` as the default runtime: - -```json -{ - "default-runtime": "nvidia", - "runtimes": { - "nvidia": { - "path": "/usr/bin/nvidia-container-runtime", - "runtimeArgs": [] - } - } -} -``` - -Restart Docker: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart docker -``` - -#### Configure containerd {#configure-containerd} - -When using Kubernetes with containerd, modify the configuration file (usually `/etc/containerd/config.toml`) to set `nvidia-container-runtime` as the default runtime: - -```toml -version = 2 -[plugins] - [plugins."io.containerd.grpc.v1.cri"] - [plugins."io.containerd.grpc.v1.cri".containerd] - default_runtime_name = "nvidia" - - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes] - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia] - privileged_without_host_devices = false - runtime_engine = "" - runtime_root = "" - runtime_type = "io.containerd.runc.v2" - [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options] - BinaryName = "/usr/bin/nvidia-container-runtime" -``` - -Restart containerd: - -```bash -sudo systemctl daemon-reload && sudo systemctl restart containerd -``` +--- -### 2. Label your nodes {#label-your-nodes} +## 1. Label your nodes {#label-your-nodes} -Label your GPU nodes for HAMi scheduling with `gpu=on`. Nodes without this label cannot be managed by the scheduler. +Label the target GPU nodes with `gpu=on`. Nodes without this label will not be managed by HAMi: ```bash kubectl label nodes gpu=on ``` -### 3. Deploy HAMi using Helm {#deploy-hami-using-helm} +--- -Check your Kubernetes version: +## 2. Deploy HAMi using Helm {#deploy-hami-using-helm} -```bash -kubectl version -``` - -Add the Helm repository: +Add the official HAMi Helm repository and deploy the chart: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ @@ -112,13 +38,17 @@ helm repo update helm install hami hami-charts/hami -n kube-system ``` -If successful, both `hami-device-plugin` and `hami-scheduler` pods should be in the `Running` state. +Verify that the `hami-scheduler` and `hami-device-plugin` pods are running: -## Demo {#demo} +```bash +kubectl get pods -n kube-system | grep hami +``` + +--- -### 1. Submit demo task {#submit-demo-task} +## 3. Submit a vGPU Workload {#submit-a-vgpu-workload} -Containers can now request NVIDIA vGPUs using the `nvidia.com/gpu` resource type. +Create a Pod requesting 1 vGPU with 10240 MiB of GPU memory limit: ```yaml apiVersion: v1 @@ -132,41 +62,48 @@ spec: command: ["bash", "-c", "sleep 86400"] resources: limits: - nvidia.com/gpu: 1 # Request 1 vGPU - nvidia.com/gpumem: 10240 # Each vGPU provides 10240 MiB device memory (optional) + nvidia.com/gpu: 1 + nvidia.com/gpumem: 10240 ``` -### 2. Verify container resource limits {#verify-in-container-resource-control} +Apply the manifest and wait for the Pod to become ready: -Run the following command: +```bash +kubectl apply -f gpu-pod.yaml +kubectl wait --for=condition=Ready pod/gpu-pod --timeout=120s +``` + +--- + +## 4. Verify GPU Memory Isolation {#verify-gpu-memory-isolation} + +Execute `nvidia-smi` inside the running container: ```bash kubectl exec -it gpu-pod -- nvidia-smi ``` -Expected output: +Expected output showing HAMi-core hard memory limit (`10240MiB`): ```text -[HAMI-core Msg(28:140561996502848:libvgpu.c:836)]: Initializing..... -Wed Apr 10 09:28:58 2024 +[HAMI-core Msg]: Initializing..... +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | -| | | MIG M. | |=========================================+========================+======================| | 0 Tesla V100-PCIE-32GB On | 00000000:3E:00.0 Off | 0 | | N/A 29C P0 24W / 250W | 0MiB / 10240MiB | 0% Default | -| | | N/A | -+-----------------------------------------+------------------------+----------------------+ - -+-----------------------------------------------------------------------------------------+ -| Processes: | -| GPU GI CI PID Type Process name GPU Memory | -| ID ID Usage | -|=========================================================================================| -| No running processes found | +-----------------------------------------------------------------------------------------+ -[HAMI-core Msg(28:140561996502848:multiprocess_memory_limit.c:434)]: Calling exit handler 28 +``` + +--- + +## Cleanup {#cleanup} + +Delete the test Pod: + +```bash +kubectl delete pod gpu-pod ``` diff --git a/versioned_docs/version-v2.9.0/installation/online-installation.md b/versioned_docs/version-v2.9.0/installation/online-installation.md index 3b2f5eded..0d0a6252b 100644 --- a/versioned_docs/version-v2.9.0/installation/online-installation.md +++ b/versioned_docs/version-v2.9.0/installation/online-installation.md @@ -3,41 +3,41 @@ sidebar_label: Online Installation from Helm title: Online Installation from Helm (Recommended) --- -The recommended way to deploy HAMi is via Helm. +The recommended way to deploy HAMi in a Kubernetes cluster is via the official Helm chart. -## Add HAMi repo +## 1. Add HAMi Helm Repository {#add-hami-repo} -You can add HAMi chart repository using the following command: +Add the HAMi chart repository and update local repository cache: ```bash helm repo add hami-charts https://project-hami.github.io/HAMi/ helm repo update ``` -## Get your Kubernetes version +## 2. Deploy HAMi {#deploy-hami} -A Kubernetes version is required for proper installation. You can retrieve your Kubernetes server version with: +Deploy HAMi into the `kube-system` namespace using standard Helm installation: ```bash -kubectl version +helm install hami hami-charts/hami -n kube-system ``` -## Installation +### Customizing Helm Configurations -Ensure the `scheduler.kubeScheduler.imageTag` matches your Kubernetes server version. For instance, if your cluster server is v1.29.0, use the following command to deploy: +You can customize your deployment by passing parameters with `--set` or providing a custom `values.yaml` file: ```bash -helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system +helm install hami hami-charts/hami -n kube-system -f custom-values.yaml ``` -Customize your installation by editing the [configurations](../userguide/configure.md). +For a detailed breakdown of available chart options and configuration keys, see the [Configuration Guide](../userguide/configure.md). -## Verify your installation +## 3. Verify Installation {#verify-installation} -You can verify your installation using the following command: +Verify that the HAMi components (`hami-device-plugin` and `hami-scheduler`) are running correctly: ```bash -kubectl get pods -n kube-system +kubectl get pods -n kube-system | grep hami ``` -If both hami-device-plugin and hami-scheduler pods are in the Running state, your installation is successful. +If both `hami-device-plugin` and `hami-scheduler` pods are in the `Running` state, your installation is successful. From 40d660616e3b7d58c258d86decbdd5b9ce7b5124 Mon Sep 17 00:00:00 2001 From: Srijan Date: Tue, 4 Aug 2026 18:35:41 +0530 Subject: [PATCH 2/2] docs(get-started): address maintainer review feedback Part of #689 Signed-off-by: Srijan --- docs/get-started/deploy-with-helm.md | 11 +++++++++-- docs/installation/online-installation.md | 6 +++--- .../current/get-started/deploy-with-helm.md | 11 +++++++++-- .../current/installation/online-installation.md | 7 +++---- .../version-v2.9.0/get-started/deploy-with-helm.md | 11 +++++++++-- .../installation/online-installation.md | 7 +++---- .../version-v2.9.0/get-started/deploy-with-helm.md | 11 +++++++++-- .../installation/online-installation.md | 6 +++--- 8 files changed, 48 insertions(+), 22 deletions(-) diff --git a/docs/get-started/deploy-with-helm.md b/docs/get-started/deploy-with-helm.md index 4d2f15d6e..e9025324b 100644 --- a/docs/get-started/deploy-with-helm.md +++ b/docs/get-started/deploy-with-helm.md @@ -1,7 +1,6 @@ --- title: Quick Start sidebar_label: Get Started -translated: true --- Get HAMi up and running in minutes by deploying the Helm chart and submitting your first shared GPU workload. @@ -14,7 +13,7 @@ Before deploying HAMi, ensure your GPU nodes meet the following prerequisites: - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA Driver](https://www.nvidia.cn/drivers/unix/) v440+ -- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (with `nvidia-container-runtime` configured as the container runtime) +- [NVIDIA Container Toolkit](../installation/prerequisites) (with `nvidia-container-runtime` set as default runtime) --- @@ -107,3 +106,11 @@ Delete the test Pod: ```bash kubectl delete pod gpu-pod ``` + +--- + +## Next steps {#next-steps} + +- Verify your setup in detail with [Verify HAMi Installation](./verify-hami.md). +- Learn how to customize your deployment parameters in the [Configuration Guide](../userguide/configure.md). + diff --git a/docs/installation/online-installation.md b/docs/installation/online-installation.md index 0d0a6252b..98c709bf8 100644 --- a/docs/installation/online-installation.md +++ b/docs/installation/online-installation.md @@ -16,10 +16,10 @@ helm repo update ## 2. Deploy HAMi {#deploy-hami} -Deploy HAMi into the `kube-system` namespace using standard Helm installation: +Ensure `scheduler.kubeScheduler.imageTag` matches your Kubernetes server version (e.g. `v1.29.0`). Deploy HAMi into the `kube-system` namespace using Helm: ```bash -helm install hami hami-charts/hami -n kube-system +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system ``` ### Customizing Helm Configurations @@ -27,7 +27,7 @@ helm install hami hami-charts/hami -n kube-system You can customize your deployment by passing parameters with `--set` or providing a custom `values.yaml` file: ```bash -helm install hami hami-charts/hami -n kube-system -f custom-values.yaml +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system -f custom-values.yaml ``` For a detailed breakdown of available chart options and configuration keys, see the [Configuration Guide](../userguide/configure.md). diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md b/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md index b073f0783..236737f3a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/get-started/deploy-with-helm.md @@ -1,7 +1,6 @@ --- title: 快速开始 sidebar_label: 快速开始 -translated: true --- 只需几分钟,即可通过部署 Helm Chart 并提交您的第一个 GPU 共享工作负载快速上手 HAMi。 @@ -14,7 +13,7 @@ translated: true - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA 驱动](https://www.nvidia.cn/drivers/unix/) v440+ -- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) +- [NVIDIA Container Toolkit](../installation/prerequisites) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) --- @@ -107,3 +106,11 @@ kubectl exec -it gpu-pod -- nvidia-smi ```bash kubectl delete pod gpu-pod ``` + +--- + +## 下一步 {#next-steps} + +- 参阅 [验证 HAMi 安装](./verify-hami.md) 查看详细验证步骤。 +- 参阅 [配置指南](../userguide/configure.md) 了解如何自定义部署参数与设备配置。 + diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md b/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md index ea4b4c176..064e5e2bf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/installation/online-installation.md @@ -1,7 +1,6 @@ --- sidebar_label: 通过 Helm 在线安装 title: 通过 Helm 在线安装(推荐) -translated: true --- 在 Kubernetes 集群中部署 HAMi 的推荐方式是使用官方 Helm Chart。 @@ -17,10 +16,10 @@ helm repo update ## 2. 部署 HAMi {#deploy-hami} -使用标准 Helm 命令将 HAMi 部署至 `kube-system` 命名空间: +请确保 `scheduler.kubeScheduler.imageTag` 与您的 Kubernetes 服务端版本匹配(例如 `v1.29.0`)。将 HAMi 部署至 `kube-system` 命名空间: ```bash -helm install hami hami-charts/hami -n kube-system +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system ``` ### 自定义 Helm 配置 @@ -28,7 +27,7 @@ helm install hami hami-charts/hami -n kube-system 您可以通过 `--set` 参数或指定自定义 `values.yaml` 文件来自定义部署配置: ```bash -helm install hami hami-charts/hami -n kube-system -f custom-values.yaml +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system -f custom-values.yaml ``` 详细的配置项说明请参阅 [配置指南](../userguide/configure.md)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md index b073f0783..236737f3a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/get-started/deploy-with-helm.md @@ -1,7 +1,6 @@ --- title: 快速开始 sidebar_label: 快速开始 -translated: true --- 只需几分钟,即可通过部署 Helm Chart 并提交您的第一个 GPU 共享工作负载快速上手 HAMi。 @@ -14,7 +13,7 @@ translated: true - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA 驱动](https://www.nvidia.cn/drivers/unix/) v440+ -- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) +- [NVIDIA Container Toolkit](../installation/prerequisites) (需预先配置并将 `nvidia-container-runtime` 设为默认容器运行时) --- @@ -107,3 +106,11 @@ kubectl exec -it gpu-pod -- nvidia-smi ```bash kubectl delete pod gpu-pod ``` + +--- + +## 下一步 {#next-steps} + +- 参阅 [验证 HAMi 安装](./verify-hami.md) 查看详细验证步骤。 +- 参阅 [配置指南](../userguide/configure.md) 了解如何自定义部署参数与设备配置。 + diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md index ea4b4c176..064e5e2bf 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-v2.9.0/installation/online-installation.md @@ -1,7 +1,6 @@ --- sidebar_label: 通过 Helm 在线安装 title: 通过 Helm 在线安装(推荐) -translated: true --- 在 Kubernetes 集群中部署 HAMi 的推荐方式是使用官方 Helm Chart。 @@ -17,10 +16,10 @@ helm repo update ## 2. 部署 HAMi {#deploy-hami} -使用标准 Helm 命令将 HAMi 部署至 `kube-system` 命名空间: +请确保 `scheduler.kubeScheduler.imageTag` 与您的 Kubernetes 服务端版本匹配(例如 `v1.29.0`)。将 HAMi 部署至 `kube-system` 命名空间: ```bash -helm install hami hami-charts/hami -n kube-system +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system ``` ### 自定义 Helm 配置 @@ -28,7 +27,7 @@ helm install hami hami-charts/hami -n kube-system 您可以通过 `--set` 参数或指定自定义 `values.yaml` 文件来自定义部署配置: ```bash -helm install hami hami-charts/hami -n kube-system -f custom-values.yaml +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system -f custom-values.yaml ``` 详细的配置项说明请参阅 [配置指南](../userguide/configure.md)。 diff --git a/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md b/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md index 4d2f15d6e..e9025324b 100644 --- a/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md +++ b/versioned_docs/version-v2.9.0/get-started/deploy-with-helm.md @@ -1,7 +1,6 @@ --- title: Quick Start sidebar_label: Get Started -translated: true --- Get HAMi up and running in minutes by deploying the Helm chart and submitting your first shared GPU workload. @@ -14,7 +13,7 @@ Before deploying HAMi, ensure your GPU nodes meet the following prerequisites: - [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) v1.23+ - [CUDA](https://developer.nvidia.com/cuda-toolkit) v10.2+ - [NVIDIA Driver](https://www.nvidia.cn/drivers/unix/) v440+ -- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) (with `nvidia-container-runtime` configured as the container runtime) +- [NVIDIA Container Toolkit](../installation/prerequisites) (with `nvidia-container-runtime` set as default runtime) --- @@ -107,3 +106,11 @@ Delete the test Pod: ```bash kubectl delete pod gpu-pod ``` + +--- + +## Next steps {#next-steps} + +- Verify your setup in detail with [Verify HAMi Installation](./verify-hami.md). +- Learn how to customize your deployment parameters in the [Configuration Guide](../userguide/configure.md). + diff --git a/versioned_docs/version-v2.9.0/installation/online-installation.md b/versioned_docs/version-v2.9.0/installation/online-installation.md index 0d0a6252b..98c709bf8 100644 --- a/versioned_docs/version-v2.9.0/installation/online-installation.md +++ b/versioned_docs/version-v2.9.0/installation/online-installation.md @@ -16,10 +16,10 @@ helm repo update ## 2. Deploy HAMi {#deploy-hami} -Deploy HAMi into the `kube-system` namespace using standard Helm installation: +Ensure `scheduler.kubeScheduler.imageTag` matches your Kubernetes server version (e.g. `v1.29.0`). Deploy HAMi into the `kube-system` namespace using Helm: ```bash -helm install hami hami-charts/hami -n kube-system +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system ``` ### Customizing Helm Configurations @@ -27,7 +27,7 @@ helm install hami hami-charts/hami -n kube-system You can customize your deployment by passing parameters with `--set` or providing a custom `values.yaml` file: ```bash -helm install hami hami-charts/hami -n kube-system -f custom-values.yaml +helm install hami hami-charts/hami --set scheduler.kubeScheduler.imageTag=v1.29.0 -n kube-system -f custom-values.yaml ``` For a detailed breakdown of available chart options and configuration keys, see the [Configuration Guide](../userguide/configure.md).