Skip to content
Open
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
35 changes: 35 additions & 0 deletions docs/installation/how-to-use-hami-dra.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: How to Use HAMi DRA
translated: true
---

# HAMi DRA for Kubernetes

## Introduction
HAMi has provided support for K8s [DRA](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) (Dynamic Resource Allocation).
By installing the [HAMi DRA webhook](https://github.com/Project-HAMi/HAMi-DRA) in your cluster, you can get a consistent user experience in DRA mode that matches the traditional usage.

## Prerequisites
* Kubernetes version >= 1.34 with DRA Consumable Capacity [featuregate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) enabled

## Installation

You can use the following commands to add the HAMi chart repository and update dependencies:

``` bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``` bash
```bash

helm repo add hami-charts https://project-hami.github.io/HAMi/
helm dependency build
```

Then install with the following command:
``` bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``` bash
```bash

helm install hami hami-charts/hami --set dra.enable=true -n hami-system
```

> **Note:** *DRA mode is not compatible with traditional mode. Do not enable both at the same time.*

## Supported Devices
The implementation of DRA functionality requires support from the corresponding device's DRA Driver. Currently supported devices include:
* [NVIDIA GPU](../userguide/NVIDIA-device/dynamic-resource-allocation.md)

Please refer to the corresponding page to install the device driver.
26 changes: 26 additions & 0 deletions docs/userguide/NVIDIA-device/dynamic-resource-allocation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Dynamic Resource Allocation
translated: true
---

# Dynamic Resource Allocation

## Introduction

HAMi has supported K8s [DRA](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) (Dynamic Resource Allocation) on NVIDIA devices.
By installing hami-k8s-dra-driver, your cluster scheduler can discover Nvidia GPU devices on nodes.

## Prerequisites

* The underlying container runtime (e.g., containerd or CRI-O) has [CDI](https://github.com/cncf-tags/container-device-interface?tab=readme-ov-file#how-to-configure-cdi) enabled

## Installation

The Nvidia DRA driver is built into HAMi and does not need to be installed separately. You only need to specify the `--set hami-dra-webhook.drivers.nvidia.enabled=true` parameter when [installing HAMi DRA](../../installation/how-to-use-hami-dra.md). For more information, please refer to [Installing Nvidia DRA driver](https://github.com/Project-HAMi/HAMi-DRA?tab=readme-ov-file#installation)

## Verify Installation

To verify the installation is successful, use the following command to view GPU devices:
```bash
kubectl get resourceslices.resource.k8s.io -A
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: 如何使用 HAMi DRA
translated: true
---

# Kubernetes 的 HAMi DRA

## 介绍
HAMi 已经提供了对 K8s [DRA](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/)(动态资源分配)功能的支持。
通过在集群中安装 [HAMi Dra webhook](https://github.com/Project-HAMi/HAMi-DRA) 你可以在 DRA 模式下获得与传统使用方式一致的使用体验。

## 前提条件
* Kubernetes 版本 >= 1.34 并且 DRA Consumable Capacity [featuregate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) 启用

## 安装

您可以使用以下命令添加 HAMi 图表仓库并更新依赖:

``` bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``` bash
```bash

helm repo add hami-charts https://project-hami.github.io/HAMi/
helm dependency build
```

然后用以下命令进行安装:
``` bash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``` bash
```bash

helm install hami hami-charts/hami --set dra.enable=true -n hami-system
```

> **注意:** *DRA 模式与传统模式不兼容,请勿同时启用。*

## 支持的设备
DRA 功能的实现需要对应设备的 DRA Driver 提供支持,目前支持的设备包括:
* [NVIDIA GPU](../userguide/NVIDIA-device/dynamic-resource-allocation.md)

请参照对应的页面安装设备驱动。
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: 动态资源分配
translated: true
---

# 动态资源分配

## 介绍

HAMi 已经在 NVIDIA 设备上支持了 K8s [DRA](https://kubernetes.io/docs/concepts/scheduling-eviction/dynamic-resource-allocation/)(动态资源分配)功能。
通过安装 hami-k8s-dra-driver 你的集群调度器可以发现节点上的 Nvidia GPU 设备。

## 前提条件

* 底层容器运行时(例如 containerd 或 CRI-O)启用 [CDI](https://github.com/cncf-tags/container-device-interface?tab=readme-ov-file#how-to-configure-cdi)

## 安装

Nvidia dra driver 内置在 HAMi 中,无需单独安装,只需要在[安装 HAMi DRA](../../installation/how-to-use-hami-dra.md) 时指定 `--set hami-dra-webhook.drivers.nvidia.enabled=true` 参数即可。更多信息请参考[安装 Nvidia DRA driver](https://github.com/Project-HAMi/HAMi-DRA?tab=readme-ov-file#installation)

## 验证安装

验证安装成功,请使用以下命令查看 GPU 设备:
```bash
kubectl get resourceslices.resource.k8s.io -A
```
4 changes: 3 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ module.exports = {
"installation/webui-installation",
"installation/how-to-use-volcano-vgpu",
"installation/how-to-use-volcano-ascend",
"installation/aws-installation"
"installation/aws-installation",
"installation/how-to-use-hami-dra"
]
},
{
Expand All @@ -57,6 +58,7 @@ module.exports = {
"type": "category",
"label": "Share NVIDIA GPU devices",
"items": [
"userguide/NVIDIA-device/dynamic-resource-allocation",
"userguide/NVIDIA-device/dynamic-mig-support",
"userguide/NVIDIA-device/specify-device-memory-usage",
"userguide/NVIDIA-device/specify-device-core-usage",
Expand Down