Skip to content

Commit 23ebca4

Browse files
committed
dra
1 parent 6090ae2 commit 23ebca4

6 files changed

Lines changed: 127 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
weight: 20
3+
---
4+
5+
# Enable CDI in Containerd
6+
7+
CDI (Container Device Interface) provides a standard mechanism for device vendors to describe what is required to provide access to a specific resource such as a GPU beyond a simple device name.
8+
9+
CDI support is enabled by default in containerd version 2.0 and later. Earlier versions, starting from 1.7.0, support for this feature requires manual activation.
10+
11+
## Steps to Enable CDI in Containerd (1.7.0 <= version < 2.0.0)
12+
13+
1. Update containerd configuration.
14+
Edit the configuration file:
15+
```bash
16+
vi /etc/containerd/config.toml
17+
```
18+
Add or modify the following section:
19+
```toml
20+
[plugins."io.containerd.grpc.v1.cri"]
21+
enable_cdi = true
22+
```
23+
2. Restart containerd.
24+
```bash
25+
systemctl restart containerd
26+
systemctl status containerd
27+
```
28+
Ensure the service is running correctly.
29+
30+
3. Verify CDI is Enabled.
31+
```bash
32+
journalctl -u containerd | grep "EnableCDI:true"
33+
```
34+
Wait a moment, if there are logs, it means the setup was successful.

docs/en/pgpu_dra/how_to/index.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
weight: 30
3+
i18n:
4+
title:
5+
en: How To
6+
zh: How To
7+
---
8+
9+
# How To
10+
11+
<Overview />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
weight: 30
3+
---
4+
5+
# Enable DRA(Dynamic Resource Allocation) in Kubernetes
6+
7+

docs/en/pgpu_dra/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
weight: 83
3+
---
4+
# Alauda Build of NVIDIA DRA Driver for GPUs
5+
6+
<Overview />

docs/en/pgpu_dra/install.mdx

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
weight: 20
3+
---
4+
5+
# Installation
6+
7+
## Prerequisites
8+
9+
- **NvidiaDriver v565+**
10+
- **Kubernetes v1.32+**
11+
- **ACP v4.1+**
12+
- **Cluster administrator access to your ACP cluster**
13+
- **CDI must be enabled in the underlying container runtime (such as containerd)**
14+
- **DRA and corresponding API groups must be enabled**
15+
16+
## Procedure
17+
18+
### Installing Nvidia driver in your gpu node
19+
Prefer to [Installation guide of Nvidia Official website](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/)
20+
21+
### Installing Nvidia Container Runtime
22+
Prefer to [Installation guide of Nvidia Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
23+
24+
### Downloading Cluster plugin
25+
26+
:::info
27+
28+
`Alauda Build of NVIDIA DRA Driver for GPUs` cluster plugin can be retrieved from Customer Portal.
29+
30+
Please contact Consumer Support for more information.
31+
32+
:::
33+
34+
### Uploading the Cluster plugin
35+
36+
For more information on uploading the cluster plugin, please refer to <ExternalSiteLink name="acp" href="ui/cli_tools/index.html#uploading-cluster-plugins" children="Uploading Cluster Plugins" />
37+
38+
### Installing Alauda Build of NVIDIA DRA Driver for GPUs
39+
40+
1. Add label "nvidia-device-enable=pgpu-dra" in your GPU node for `nvidia-dra-driver-gpu-kubelet-plugin` schedule.
41+
```bash
42+
kubectl label nodes {nodeid} nvidia-device-enable=pgpu-dra
43+
```
44+
:::info
45+
**Note: On the same node, you can only set one of the following labels: `gpu=on`, `nvidia-device-enable=pgpu`, or `nvidia-device-enable=pgpu-dra`.**
46+
:::
47+
48+
2. Go to the `Administrator` -> `Marketplace` -> `Cluster Plugin` page, switch to the target cluster, and then deploy the `Alauda Build of NVIDIA DRA Driver for GPUs` Cluster plugin.
49+
50+
3. Verify result. You can see the status of "Installed" in the UI or you can check the pod status:
51+
```bash
52+
kubectl get pods -n kube-system | grep "nvidia-dra-driver-gpu"
53+
```
54+
You should get results similar to:
55+
```
56+
nvidia-dra-driver-gpu-controller-675644bfb5-c2hq4 1/1 Running 0 18h
57+
nvidia-dra-driver-gpu-kubelet-plugin-65fjt 2/2 Running 0 18h
58+
```
59+
60+
### Upgrading Alauda Build of NVIDIA DRA Driver for GPUs
61+
62+
1. Upload the new version for package of **Alauda Build of NVIDIA DRA Driver for GPUs** plugin to ACP.
63+
2. Go to the `Administrator` -> `Clusters` -> `Target Cluster` -> `Functional Components` page, then click the `Upgrade` button, and you will see the `Alauda Build of NVIDIA DRA Driver for GPUs` can be upgraded.

docs/en/pgpu_dra/intro.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
weight: 10
3+
---
4+
# Introduction
5+
6+
Dynamic Resource Allocation (DRA) is a Kubernetes feature that provides a more flexible and extensible way to request and allocate hardware resources like GPUs. Unlike traditional device plugins that only support simple counting of identical resources, DRA enables fine-grained resource selection based on device attributes and capabilities.

0 commit comments

Comments
 (0)