Install the ack-cgpu component
Container Service for Kubernetes provides the GPU sharing feature that allows multiple prediction models to share one GPU and supports GPU memory isolation based on the NVIDIA kernel mode driver. This topic describes how to install the ack-cgpu component, which can be used to share GPUs, isolate GPU memory, and query GPU allocation information.
Prerequisites
An ACK dedicated cluster that contains GPU-accelerated nodes is created. For more information, see Create an ACK cluster with GPU-accelerated nodes.
A kubectl client is connected to the cluster. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.
Limits
Do not set the CPU policy to static for nodes that enable GPU sharing.
The following table describes other limits.
Item | Requirement |
Kubernetes | Kubernetes 1.12.6 or later |
Operating system | Operating systems supported by ACK except Windows |
GPU model | For more information about the GPU model supported by ACK, see GPU-accelerated ECS instance types supported by ACK |
Step 1: Add labels to GPU-accelerated nodes
Log on to the ACK console. In the left navigation pane, click Clusters.
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Nodes page, click Manage Labels and Taints in the upper-right corner.
-
On the Manage Labels and Taints page, select the desired nodes and click Add Label.
-
In the Add dialog box, enter a Name and a Value for the label, and then click OK.
Set Name to cgpu and Value to true to enable the GPU sharing feature for the node.
If you need to disable the GPU sharing feature for a node, you can set the Name to cgpu and the Value to false. Deleting the label does not disable the GPU sharing feature.
Step 2: Install the ack-cgpu component on the labeled nodes
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
In the upper-left corner of the page, click Create. On the Chart tab, select ack-cgpu and follow the on-screen instructions to install the ack-cgpu component.
On the Helm page, verify that the Status of ack-cgpu is Deployed.