K8s集成Docker场景下,用户需要安装Ascend Docker Runtime。
apiVersion: mindxdl.gitee.com/v1 kind: xxx ... spec: ... spec: ... containers: - name: ascend image: pytorch-test:latest # 镜像名称根据实际情况修改 ... resources: limits: huawei.com/Ascend910: 1 # 资源名称和数量根据实际情况修改 requests: huawei.com/Ascend910: 1 # 资源名称和数量根据实际情况修改 ...
apiVersion: mindxdl.gitee.com/v1 kind: xxx ... spec: ... spec: ... containers: - name: ascend image: pytorch-test:latest # 镜像名称根据实际情况修改 ... env: - name: ASCEND_VISIBLE_DEVICES # 未使用resources申请NPU资源时需增加此配置 value: "void" ...