-
Notifications
You must be signed in to change notification settings - Fork 0
/
job-example-gpu.yaml
59 lines (59 loc) · 1.5 KB
/
job-example-gpu.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: batch/v1
kind: Job
metadata:
name: job222234567
namespace: default
labels:
kueue.x-k8s.io/queue-name: user-queue
spec:
parallelism: 3
completions: 3
template:
spec:
volumes:
- name: script
hostPath:
path: /nfs/entry.sh
type: File
- name: data
hostPath:
path: /nfs/home/demo_admin/data
type: ""
- name: algorithm
hostPath:
path: /nfs/home/demo_admin/algorithm
type: ""
- name: workdir
hostPath:
path: /nfs/home/demo_admin
type: ""
- name: extramount
hostPath:
path: /nfs/home/demo_admin
type: ""
nodeSelector:
kubernetes.io/os: linux
containers:
- image: jupyter/minimal-notebook:latest
imagePullPolicy: IfNotPresent
name: job222234567
command: ["bash", "/opt/entry.sh", "20000", "k8s-master", "30001"]
env:
- name: WORK_DIR
value: /nfs/home/demo_admin
resources:
limits:
nvidia.com/gpu: 1
workingDir: /nfs/home/demo_admin
volumeMounts:
- mountPath: /opt/entry.sh
name: script
- mountPath: /nfs/home/demo_admin/data
name: data
- mountPath: /nfs/home/demo_admin/algorithm
name: algorithm
- mountPath: /nfs/home/demo_admin
name: workdir
- mountPath: /nfs/home/demo_admin
name: extramount
restartPolicy: OnFailure