将任务分配给特定类型

将任务分配给特定类型

要将任务分配给特定的 GPU 类型,请在 annotations 字段中设置 nvidia.com/use-gputype

apiVersion: v1
kind: Pod
metadata:
  name: gpu-pod
  annotations:
    nvidia.com/use-gputype: "A100,V100"    #In this example, we want to run this job on A100 or V100
spec:
  containers:
    - name: ubuntu-container
      image: ubuntu:18.04
      command: ["bash", "-c", "sleep 86400"]
      resources:
        limits:
          nvidia.com/gpu: 2 # requesting 2 vGPUs

注意: 您可以通过逗号分隔的方式将此任务分配给多个 GPU 类型。在此示例中,我们希望在 A100 或 V100 上运行此作业。