-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.yml.erb
139 lines (136 loc) · 3.46 KB
/
form.yml.erb
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<%-
accounts = OodAppkit.clusters[:klone].custom_config[:accounts]
hyakparts = OodAppkit.clusters[:klone].custom_config[:hyakparts]
g1gpus = OodAppkit.clusters[:klone].custom_config[:g1gpus]
g2gpus = OodAppkit.clusters[:klone].custom_config[:g2gpus]
my_accounts = {}
accounts.each do |a, v|
my_accounts[a] = v if v["users"].include? User.new.name
end
-%>
---
cluster: "klone"
attributes:
haccount:
label: Account
help: Please select an account from the drop-down.
widget: select
options:
<%- my_accounts.each do |a, v| -%>
- [ "<%= a %>", "<%= a %>" ]
<%- end -%>
hqueue:
label: Partition
help: Please select a partition from the drop-down.
widget: select
options:
- [ 'ckpt', 'ckpt',
data-set-hgputype: 'none',
data-set-hgpus: 0,
data-hide-hgpus: true,
]
- [ 'ckpt-g2', 'ckpt-g2',
data-set-hgputype: 'none',
data-set-hgpus: 0,
data-hide-hgpus: true,
]
- [ 'ckpt-all', 'ckpt-all',
data-set-hgputype: 'none',
data-set-hgpus: 0,
data-hide-hgpus: true,
]
<%- hyakparts.each do |p| -%>
- [
"<%= p %>", "<%= p %>",
<%- my_accounts.each do |a, v|
if not v["partitions"].include? p -%>
data-option-for-haccount-<%= a %>: "false",
<%- end
end -%>
data-set-hgputype: "<%= p["gpu"] ? p.sub('gpu-', '') : 'none' %>",
data-hide-hgputype: true,
<%- if not p["gpu"] -%>
data-set-hgpus: 0,
data-hide-hgpus: true
<%- end -%>
]
<%- end -%>
htasks:
label: Tasks
widget: number_field
value: 1
hcpus:
label: CPUs per task
widget: number_field
value: 1
hmem:
label: Memory (GB)
value: 1
hgputype:
label: GPU Type
widget: select
options:
- [ "None", "none", data-set-hgpus: 0, data-hide-hgpus: true ]
- [ "Any", "", data-set-hgpus: 0 ]
<%- g1gpus.each do |k, v| -%>
- [ "<%= v %>", "<%= k %>",
data-option-for-hqueue-ckpt-g2: "false",
]
<%- end -%>
<%- g2gpus.each do |k, v| -%>
- [ "<%= v %>", "<%= k %>",
data-option-for-hqueue-ckpt: "false",
]
<%- end -%>
hgpus:
label: GPUs
widget: number_field
min: 0
max: 8
value: 0
sif:
label: Jupyter Container
widget: select
help: Select 'Custom' if you have created your own Jupyter-Apptainer image.
options:
- [
"jupyter/minimal-notebook",
"/mmfs1/sw/ondemand/containers/jupyter/minimal-notebook",
data-hide-custom-sif: true
]
- [
"jupyter/scipy-notebook",
"/mmfs1/sw/ondemand/containers/jupyter/scipy-notebook",
data-hide-custom-sif: true
]
- [
"jupyter/datascience-notebook",
"/mmfs1/sw/ondemand/containers/jupyter/datascience-notebook",
data-hide-custom-sif: true
]
- [ "Custom", "" ]
value: "Default"
custom_sif:
label: Full path to your customized Jupyter-Apptainer container.
help: "e.g. /mmfs1/gscratch/labname/containers/my_jupyter.sif"
jupyter_ui:
label: Jupyter User Interface
widget: "radio_button"
value: "lab"
options:
- ["Jupyter Lab", "lab" ]
- ["Jupyter Notebook", "notebook" ]
extra_jupyter_args: ""
form:
- haccount
- hqueue
- sif
- custom_sif
- jupyter_ui
- extra_jupyter_args
- htasks
- hcpus
- hmem
- hgputype
- hgpus
- bc_num_hours