-
Notifications
You must be signed in to change notification settings - Fork 37
add DRA docs #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
FouoF
wants to merge
1
commit into
Project-HAMi:master
Choose a base branch
from
FouoF:add-DRA
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add DRA docs #119
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||||||
| helm repo add hami-charts https://project-hami.github.io/HAMi/ | ||||||
| helm dependency build | ||||||
| ``` | ||||||
|
|
||||||
| Then install with the following command: | ||||||
| ``` bash | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 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
26
docs/userguide/NVIDIA-device/dynamic-resource-allocation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| ``` |
35 changes: 35 additions & 0 deletions
35
i18n/zh/docusaurus-plugin-content-docs/current/installation/how-to-use-hami-dra.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| helm repo add hami-charts https://project-hami.github.io/HAMi/ | ||||||
| helm dependency build | ||||||
| ``` | ||||||
|
|
||||||
| 然后用以下命令进行安装: | ||||||
| ``` bash | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| 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) | ||||||
|
|
||||||
| 请参照对应的页面安装设备驱动。 | ||||||
26 changes: 26 additions & 0 deletions
26
...gin-content-docs/current/userguide/NVIDIA-device/dynamic-resource-allocation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.