代码拉取完成,页面将自动刷新
apiVersion: apps/v1
kind: Deployment
metadata:
name: resnetinfer1-1-deploy-1usoc
labels:
app: infers
spec:
replicas: 1
selector:
matchLabels:
app: infers
template:
metadata:
labels:
app: infers
host-arch: huawei-arm
fault-scheduling: grace # Add this Labels, will reschedule pods in the event of chip failures.
ring-controller.atlas: ascend-310P # Add this Label, used to check job kind.
spec:
schedulerName: volcano
nodeSelector:
host-arch: huawei-arm
servertype: soc # Cannot be delete. And node should be labeled with this label.
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/Ascend310P'] # The value must be the same as resources.requests
resources:
requests:
huawei.com/Ascend310P: 1 # Number of the Ascend 310P Processors.
limits:
huawei.com/Ascend310P: 1 # The value should be the same as that of requests .
volumeMounts:
- name: hiai-driver
mountPath: /usr/local/Ascend/driver
readOnly: true
- name: slog
mountPath: /etc/slog.conf
- name: localtime #The container time must be the same as the host time.
mountPath: /etc/localtime
- name: dmp
mountPath: /var/dmp_daemon
- name: slogd
mountPath: /var/slogd
- name: hbasic
mountPath: /etc/hdcBasic.cfg
- name: sys-version
mountPath: /etc/sys_version.conf
- name: aicpu
mountPath: /usr/lib64/aicpu_kernels
- name: tfso
mountPath: /usr/lib64/libtensorflow.so
volumes:
- name: hiai-driver
hostPath:
path: /usr/local/Ascend/driver
- name: slog
hostPath:
path: /etc/slog.conf
type: File
- name: localtime
hostPath:
path: /etc/localtime
- name: dmp
hostPath:
path: /var/dmp_daemon
- name: slogd
hostPath:
path: /var/slogd
- name: hbasic
hostPath:
path: /etc/hdcBasic.cfg
- name: sys-version
hostPath:
path: /etc/sys_version.conf
- name: aicpu
hostPath:
path: /usr/lib64/aicpu_kernels
- name: tfso
hostPath:
path: /usr/lib64/libtensorflow.so
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。