代码拉取完成,页面将自动刷新
apiVersion: apps/v1
kind: Deployment
metadata:
name: resnetinfer1-1-deploy
labels:
app: infers
spec:
replicas: 1
selector:
matchLabels:
app: infers
template:
metadata:
labels:
app: infers
host-arch: huawei-arm # Select the os arch. If the os arch is arm, change it to huawei-x86.
npu-310-strategy: card # Select the 310 scheduling policy. If choose to schedule by chip, change it to chip.
fault-scheduling: grace # Add this Labels, will reschedule pods in the event of chip failures.
ring-controller.atlas: ascend-310 # Add this Label, used to check job kind.
spec:
schedulerName: volcano
nodeSelector:
host-arch: huawei-arm # Select the os arch. If the os arch is x86, change it to huawei-x86.
containers:
- image: ubuntu-infer:v1 # Inference image name
imagePullPolicy: IfNotPresent
name: resnet50infer
env:
# ASCEND_VISIBLE_DEVICES env variable is used by ascend-docker-runtime when in the whole card scheduling scene with volcano scheduler. please delete it when in the static or dynamic vNPU scheduling scene or without volcano.
- name: ASCEND_VISIBLE_DEVICES
valueFrom:
fieldRef:
fieldPath: metadata.annotations['huawei.com/Ascend310'] # The value must be the same as resources.requests. If the Ascend 310P Processor is used, change it to huawei.com/Ascend310P.
resources:
requests:
huawei.com/Ascend310: 1 # Number of the Ascend 310 Processors. If the Ascend 310P Processor is used, change it to huawei.com/Ascend310P.
limits:
huawei.com/Ascend310: 1 # The value should be the same as that of requests . If the Ascend 310P Processor is used, change it to huawei.com/Ascend310P.
volumeMounts:
- name: slog
mountPath: /var/log/npu/conf/slog/ #Log path
- name: localtime #The container time must be the same as the host time.
mountPath: /etc/localtime
volumes:
- name: slog
hostPath:
path: /var/log/npu/conf/slog/
- name: localtime
hostPath:
path: /etc/localtime
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。