代码拉取完成,页面将自动刷新
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
name: mindx-infer-test
namespace: vcjob # Select a proper namespace based on the site requirements.
labels:
ring-controller.atlas: ascend-910b
fault-scheduling: "force"
spec:
minAvailable: 1 # The value of minAvailable is 1 in a single-node scenario, only set as 1 when infer task
schedulerName: volcano # Use the Volcano scheduler to schedule jobs.
policies:
- event: PodEvicted
action: RestartJob
maxRetry: 3
queue: default
tasks:
- name: "default-test"
replicas: 1 # The value of replicas is 1 in a single-node scenario, only set as 1 when infer task
template:
metadata:
labels:
app: infer
ring-controller.atlas: ascend-910b
spec:
automountServiceAccountToken: false
containers:
- image: infer_image:latest # Inference image, which can be modified.
imagePullPolicy: IfNotPresent
name: infer
command: ["/bin/bash", "-c", "./infer.sh"]
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/Ascend910'] # The value must be the same as resources.requests.
resources:
requests:
huawei.com/Ascend910: 1 # Number of required NPUs. The maximum value is 2. You can add lines below to configure resources such as memory and CPU.
limits:
huawei.com/Ascend910: 1 # The value must be consistent with that in requests.
volumeMounts:
- name: localtime # The container time must be the same as the host time.
mountPath: /etc/localtime
nodeSelector:
host-arch: huawei-arm # Configure the label based on the actual job.
accelerator-type: module-910b-8 # servers (with Atlas 800I A2 cards)
volumes:
- name: localtime
hostPath:
path: /etc/localtime
restartPolicy: OnFailure
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。