forked from PlaZMaD/run_ship_at
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
101 lines (95 loc) · 3.42 KB
/
config.py
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# parameters of server
K8S_PROXY = 'http://127.0.0.1:8002'
HOST_OUTPUT_DIRECTORY = 'data/EK_output'
HOST_LOCALOUTPUT_DIRECTORY = '/mnt/shipfs/EK_output'
DOCKER_OUTPUT_DIRECTORY = '/output'
# HOST_SAMPLE_DIRECTORY - local folder in the cluster
HOST_SAMPLE_DIRECTORY = '/local/ship/background_2018'
DOCKER_SAMPLE_DIRECTORY = '/sample'
TIMEOUT = 60*60*7
JOB_SPEC = {
"apiVersion": "batch/v1",
"kind": "Job",
"metadata": {
# Fill in the python script
"name": "{}"
},
"spec": {
# Don't forget about this disabled option
# "ttlSecondsAfterFinished": 14400,
"template": {
"spec": {
"containers": [
{
"name": "ekship",
"image": "mrphys/mfsimage:azcpy_fs_master_2",
# Set env in the code
# "env": [
# {"name": "fileName",
# "value": "pythia8_Geant4_10.0_withCharmandBeauty0_mu.root"},
# {"name": "mfirstEvent",
# "value": "0"},
# {"name": "nEvents",
# "value": "10"},
# {"name": "muShieldDesign",
# "value": "9"},
# {"name": "jName",
# "value": "testJob"},
# {"name": "jNumber",
# "value": "1"},
# ],
"resources": {
"requests": {
"memory": "6Gi",
"cpu": "1"
},
"limits": {
"memory": "6Gi",
"cpu": "1"
}
},
"volumeMounts": [
{
"mountPath": DOCKER_OUTPUT_DIRECTORY,
"name": "output"
},
{
"mountPath": DOCKER_SAMPLE_DIRECTORY,
"name": "muonsample",
# "readOnly": true
}
]
}
],
"hostNetwork": True,
"restartPolicy": "Never",
"volumes": [
# Use this with mount
# {
# "name": "output",
# "hostPath": {
# # Fill in the python script
# "path": "",
# "type": "Directory"
# }
# },
# Use this with azcopy
{
"name": "output",
"emptyDir": {}
},
{
"name": "muonsample",
"hostPath": {
"path": HOST_SAMPLE_DIRECTORY,
"type": "Directory"
}
}
]
}
},
"backoffLimit": 1
}
}