跳转到文档内容
版本:下一个

避开指定类型的 GPU

要让 Pod 避开某种类型的 GPU,在 Pod 注解中设置 amd.com/nouse-gputype。已注册的产品名称包含该文本即匹配。

apiVersion: v1
kind: Pod
metadata:
name: amd-gpu-type-not-use
annotations:
amd.com/nouse-gputype: "Radeon" # never run on GPUs whose registered product name contains this text, comma separated
spec:
containers:
- name: rocm
image: rocm/dev-ubuntu-24.04:7.2.4
command: ["bash", "-c", "sleep infinity"]
securityContext:
# runs as the image's user (root) on purpose: GPU device access needs the node's video and render group ids, which differ per node. For non-root add runAsUser and supplementalGroups for those groups.
allowPrivilegeEscalation: false
resources:
limits:
amd.com/gpu: 1
amd.com/gpumem: 4096
CNCFHAMi 是 CNCF 孵化项目