forked from rcurrie/jupyter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjob.yml
47 lines (47 loc) · 1.18 KB
/
job.yml
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
apiVersion: batch/v1
kind: Job
metadata:
name: job
spec:
# Don't restart if error
backoffLimit: 0
template:
spec:
# Delete the job after a certain number of seconds
ttlSecondsAfterFinished: 60
containers:
- name: run-notebook
image: robcurrie/jupyter-gpu
imagePullPolicy: Always
# securityContext:
# runAsUser: 1000
env:
- name: USER
value: $USER
- name: AWS_PROFILE
value: "prp"
- name: AWS_S3_ENDPOINT
value: "http://rook-ceph-rgw-rooks3.rook"
- name: S3_ENDPOINT
value: "rook-ceph-rgw-rooks3.rook"
- name: S3_USE_HTTPS
value: "0"
volumeMounts:
- mountPath: /root/.aws
name: credentials
resources:
requests:
cpu: "2"
memory: "8Gi"
nvidia.com/gpu: 0
limits:
cpu: "2"
memory: "8Gi"
nvidia.com/gpu: 0
command: ["/bin/bash", "-c"]
args: [ ]
restartPolicy: Never
volumes:
- name: credentials
secret:
secretName: $USER-aws-credentials