29 Star 37 Fork 74

Ascend/mindxdl-deploy
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
infer-vcjob-910.yaml 2.41 KB
一键复制 编辑 原始数据 按行查看 历史
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/ascend/mindxdl-deploy.git
git@gitee.com:ascend/mindxdl-deploy.git
ascend
mindxdl-deploy
mindxdl-deploy
master

搜索帮助