All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

Perform GPU scheduling in a cluster

Last updated:2021-05-11 10:41:31

If you need to use your cluster in computing-intensive scenarios such as machine learning and image processing, you can create a GPU-accelerated container cluster. This way, you can schedule GPU-accelerated containers without the need to manually install the NVIDIA driver or Compute Unified Device Architecture (CUDA).

Create a GPU-accelerated cluster in the KCE console

  1. Log in to the KCE console.
  2. In the left navigation pane, click Cluster.
  3. Click Create Cluster.
  4. In the Node Configuration step, select a GPU-accelerated instance type for nodes.

Schedule GPU-accelerated containers by using kubectl

Unlike CPU and memory, you must explicitly declare the number of GPUs you want to use in the YAML file by setting nvidia.com/gpu in resources.limits of containers.

Example:

apiVersion: v1
kind: Pod
metadata:
  name: cuda-vector-add
spec:
  restartPolicy: OnFailure
  containers:
    - name: cuda-vector-add
      image: hub.kce.ksyun.com/ksyun/cuda-vector-add:0.1
      resources:
        limits:
          nvidia.com/gpu: 1   # Specify the number of NVIDA GPUs to schedule.

Limits

  1. Only clusters created after December 27, 2018 support GPU scheduling. If your cluster was created earlier than that time and you want to schedule GPU-accelerated containers in the cluster, submit a ticket.
  2. You only need to specify the required GPU resources in resources.limits of containers.
  3. Containers do not support GPU sharing. You can apply for one or more GPUs for each container.
  4. You can apply for only an integer number of GPUs.
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback