-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-k8s-job.yaml
49 lines (48 loc) · 1.01 KB
/
example-k8s-job.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
---
apiVersion: batch/v1
kind: Job
metadata:
name: notebook-job
spec:
template:
spec:
volumes:
- name: dshm
emptyDir:
medium: Memory
- name: storage
emptyDir: {}
initContainers:
- image: alpine/git:latest
name: git
volumeMounts:
- mountPath: /storage
name: storage
command:
- git
args:
- clone
- https://github.com/n1mmy/notebook-docker
- /storage
containers:
- image: ghcr.io/n1mmy/notebook:latest
name: notebook
volumeMounts:
- mountPath: /dev/shm
name: dshm
- mountPath: /root/notebooks
name: storage
command:
- /root/run-notebook.sh
args:
- /root/notebooks/example.ipynb
- more
- args
resources:
## Uncomment to add a GPU
# limits:
# nvidia.com/gpu: 1
requests:
cpu: 1
restartPolicy: Never
backoffLimit: 0