MindSpore on volcano

最近更新于 Jul 31, 2021

Mindspore简介

MindSpore是华为公司推出的新一代深度学习框架,是源于全产业的最佳实践,最佳匹配昇腾处理器算力,支持终端、边缘、云全场景灵活部署,开创全新的AI编程范式,降低AI开发门槛。

MindSpore on volcano

在集群中新建mindspore-cpu.yaml如下

  1. apiVersion: batch.volcano.sh/v1alpha1
  2. kind: Job
  3. metadata:
  4. name: mindspore-cpu
  5. spec:
  6. minAvailable: 1
  7. schedulerName: volcano
  8. policies:
  9. - event: PodEvicted
  10. action: RestartJob
  11. plugins:
  12. ssh: []
  13. env: []
  14. svc: []
  15. maxRetry: 5
  16. queue: default
  17. tasks:
  18. - replicas: 8
  19. name: "pod"
  20. template:
  21. spec:
  22. containers:
  23. - command: ["/bin/bash", "-c", "python /tmp/lenet.py"]
  24. image: lyd911/mindspore-cpu-example:0.2.0
  25. imagePullPolicy: IfNotPresent
  26. name: mindspore-cpu-job
  27. resources:
  28. limits:
  29. cpu: "1"
  30. requests:
  31. cpu: "1"
  32. restartPolicy: OnFailure

进行部署。

  1. kubectl apply -f mindspore-cpu.yaml

查询集群下作业运行情况。

  1. kubectl get pods