任务类型 |
硬件型号 |
yaml文件 |
获取yaml |
---|---|---|---|
K8s或其他调度器场景下的Job任务 |
Atlas 200I Soc A1 核心板 |
infer-310p-1usoc.yaml |
根据所使用的任务类型,获取yaml |
其他类型推理节点 |
infer.yaml |
||
Volcano调度的Deployment任务 |
Atlas 200I Soc A1 核心板 |
infer-deploy-310p-1usoc.yaml |
|
其他类型推理节点 |
infer-deploy.yaml |
参数 |
取值 |
说明 |
---|---|---|
image |
- |
推理镜像名称,请根据实际修改。 |
replicas |
整数 |
运行的任务副本数量。通常情况一般为1 |
requests |
Atlas 200/300/500 推理产品环境:huawei.com/Ascend310: 芯片数量 Atlas 推理系列产品:huawei.com/Ascend310P: 芯片数量 如:huawei.com/Ascend310: 1 |
请求的NPU类型、数量,请根据实际修改。requests和limits下,芯片的名字和数量需保持一致。 |
limits |
||
host-arch |
ARM环境:huawei-arm X86环境:huawei-x86 |
需要运行推理任务的节点架构,请根据实际修改。Atlas 200I Soc A1 核心板节点仅支持huawei-arm。 |
servertype |
soc |
服务器类型。
|
以“infer-310p-1usoc.yaml”为例,参数配置示例如下。
apiVersion: batch/v1 kind: Job metadata: name: resnetinfer1-1-1usoc spec: ... nodeSelector: host-arch: huawei-arm servertype: soc containers: - image: ubuntu-infer:v1 ... resources: requests: huawei.com/Ascend310P: 1 limits: huawei.com/Ascend310P: 1 ...
apiVersion: batch/v1 kind: Job metadata: name: resnetinfer1-1 spec: template: spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: servertype operator: NotIn values: - soc nodeSelector: host-arch: huawei-arm ...
apiVersion: apps/v1 kind: Deployment ... spec: template: metadata: labels: app: infers ... spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: servertype operator: NotIn values: - soc schedulerName: volcano nodeSelector: host-arch: huawei-arm ...