20
20
#
21
21
#------------------------------------------------------------------------------
22
22
# Network configuration
23
+ # - listen on all interfaces: proxy is in localhost, users are external and
24
+ # spawners are internal
23
25
#------------------------------------------------------------------------------
24
- # Listen on all interfaces
25
- # proxy is in localhost, users are external and spawners are internal
26
+ # Public facing proxy
26
27
c .JupyterHub .bind_url = 'https://0.0.0.0:8000'
28
+ c .JupyterHub .port = 8000
29
+ # Internal hub
27
30
c .JupyterHub .hub_ip = '0.0.0.0'
28
- # IP address or hostname that spawners should use to connect to the Hub API
31
+ c . JupyterHub . hub_port = 8081
29
32
c .JupyterHub .hub_connect_ip = 'jupyterhub.internal.domain'
30
33
31
34
#------------------------------------------------------------------------------
@@ -95,6 +98,8 @@ def user_env(self, env):
95
98
# - SSH connection stablished as JupyterHub operator
96
99
# - define job script parameters and commands launching the notebook
97
100
#------------------------------------------------------------------------------
101
+ JHUB_VER = "3.1.1"
102
+
98
103
set_config (c )
99
104
c .JupyterHub .spawner_class = VSCSlurmSpawner
100
105
c .Spawner .start_timeout = 600 # seconds from job submit to job start
@@ -104,98 +109,119 @@ def user_env(self, env):
104
109
vub_lab_environments = {
105
110
"2022_default" : {
106
111
# Text displayed for this environment select option
107
- "description" : "2022a: Python v3.10.4 + kernels (default) " ,
112
+ "description" : "2022a Default: minimal with all modules available " ,
108
113
# Space separated list of modules to be loaded
109
- "modules" : "JupyterHub/2.3.1 -GCCcore-11.3.0" ,
114
+ "modules" : f "JupyterHub/{ JHUB_VER } -GCCcore-11.3.0" ,
110
115
# Path to Python environment bin/ used to start jupyter on the Slurm nodes
111
116
"path" : "" ,
112
117
# Toggle adding the environment to shell PATH (default: True)
113
118
"add_to_path" : False ,
119
+ "group" : "Python v3.10.4" ,
120
+ },
121
+ "2022_scipy" : {
122
+ "description" : "2022a DataScience: SciPy-bundle + matplotlib + dask" ,
123
+ "modules" : (
124
+ f"JupyterHub/{ JHUB_VER } -GCCcore-11.3.0 "
125
+ "SciPy-bundle/2022.05-foss-2022a "
126
+ "ipympl/0.9.3-foss-2022a "
127
+ "dask-labextension/6.0.0-foss-2022a "
128
+ ),
129
+ "path" : "" ,
130
+ "add_to_path" : False ,
131
+ "group" : "Python v3.10.4" ,
132
+ },
133
+ "2022_nglview" : {
134
+ "description" : "2022a Molecules: DataScience + nglview + 3Dmol" ,
135
+ "modules" : (
136
+ f"JupyterHub/{ JHUB_VER } -GCCcore-11.3.0 "
137
+ "SciPy-bundle/2022.05-foss-2022a "
138
+ "ipympl/0.9.3-foss-2022a "
139
+ "dask-labextension/6.0.0-foss-2022a "
140
+ "nglview/3.0.3-foss-2022a "
141
+ "py3Dmol/2.0.1.post1-GCCcore-11.3.0 "
142
+ ),
143
+ "path" : "" ,
144
+ "add_to_path" : False ,
145
+ "group" : "Python v3.10.4" ,
114
146
},
115
147
"2022_rstudio" : {
116
- "description" : "2022a: Python v3.10.4 + RStudio " ,
148
+ "description" : "2022a RStudio with R v4.2.1 " ,
117
149
"modules" : (
118
- "JupyterHub/2.3.1 -GCCcore-11.3.0 "
150
+ f "JupyterHub/{ JHUB_VER } -GCCcore-11.3.0 "
119
151
"jupyter-rsession-proxy/2.1.0-GCCcore-11.3.0 "
120
152
"RStudio-Server/2022.07.2+576-foss-2022a-Java-11-R-4.2.1 "
121
153
"IRkernel/1.3.2-foss-2022a-R-4.2.1 "
122
154
),
123
155
"path" : "" ,
124
156
"add_to_path" : False ,
157
+ "group" : "Python v3.10.4" ,
125
158
},
126
159
"2022_matlab" : {
127
- "description" : "2022a: Python v3.10.4 + MATLAB" ,
160
+ "description" : "2022a MATLAB" ,
128
161
"modules" : (
129
162
"MATLAB/2022a-r5 "
130
- "JupyterHub/2.3.1 -GCCcore-11.3.0 "
163
+ f "JupyterHub/{ JHUB_VER } -GCCcore-11.3.0 "
131
164
"jupyter-matlab-proxy/0.5.0-GCCcore-11.3.0 "
132
165
),
133
166
"path" : "" ,
134
167
"add_to_path" : False ,
168
+ "group" : "Python v3.10.4" ,
135
169
},
136
- "2022_dask" : {
137
- "description" : "2022a: Python v3.10.4 + dask" ,
138
- "modules" : (
139
- "JupyterHub/2.3.1-GCCcore-11.3.0 "
140
- "dask-labextension/6.0.0-foss-2022a "
141
- ),
170
+ "2021_default" : {
171
+ "description" : "2021a Default: minimal with all modules available" ,
172
+ "modules" : "JupyterHub/2.3.1-GCCcore-10.3.0" ,
142
173
"path" : "" ,
143
174
"add_to_path" : False ,
175
+ "group" : "Python v3.9.5" ,
144
176
},
145
- "2022_nglview " : {
146
- "description" : "2022a: Python v3.10.4 + nglview " ,
177
+ "2021_scipy " : {
178
+ "description" : "2021a DataScience: SciPy-bundle + matplotlib + dask " ,
147
179
"modules" : (
148
- "JupyterHub/2.3.1-GCCcore-11.3.0 "
149
- "nglview/3.0.3-foss-2022a "
180
+ f"JupyterHub/{ JHUB_VER } -GCCcore-10.3.0 "
181
+ "SciPy-bundle/2021.05-foss-2021a "
182
+ "ipympl/0.8.8-foss-2021a "
183
+ "dask-labextension/5.3.1-foss-2021a "
150
184
),
151
185
"path" : "" ,
152
186
"add_to_path" : False ,
187
+ "group" : "Python v3.9.5" ,
153
188
},
154
- "2021_default" : {
155
- "description" : "2021a: Python v3.9.5 + kernels (default)" ,
156
- "modules" : "JupyterHub/2.3.1-GCCcore-10.3.0" ,
189
+ "2021_nglview" : {
190
+ "description" : "2021a Molecules: DataScience + nglview" ,
191
+ "modules" : (
192
+ f"JupyterHub/{ JHUB_VER } -GCCcore-10.3.0 "
193
+ "SciPy-bundle/2021.05-foss-2021a "
194
+ "ipympl/0.8.8-foss-2021a "
195
+ "dask-labextension/5.3.1-foss-2021a "
196
+ "nglview/3.0.3-foss-2021a "
197
+ ),
157
198
"path" : "" ,
158
199
"add_to_path" : False ,
200
+ "group" : "Python v3.9.5" ,
159
201
},
160
202
"2021_rstudio" : {
161
- "description" : "2021a: Python v3.9.5 + RStudio " ,
203
+ "description" : "2021a RStudio with R v4.1.0 " ,
162
204
"modules" : (
163
- "JupyterHub/2.3.1 -GCCcore-10.3.0 "
205
+ f "JupyterHub/{ JHUB_VER } -GCCcore-10.3.0 "
164
206
"jupyter-rsession-proxy/2.1.0-GCCcore-10.3.0 "
165
207
"RStudio-Server/1.4.1717-foss-2021a-Java-11-R-4.1.0 "
166
208
"IRkernel/1.2-foss-2021a-R-4.1.0 "
167
209
),
168
210
"path" : "" ,
169
211
"add_to_path" : False ,
212
+ "group" : "Python v3.9.5" ,
170
213
},
171
214
"2021_matlab" : {
172
- "description" : "2021a: Python v3.9.5 + MATLAB" ,
215
+ "description" : "2021a MATLAB" ,
173
216
"modules" : (
174
217
"MATLAB/2021a "
175
- "JupyterHub/2.3.1 -GCCcore-10.3.0 "
218
+ f "JupyterHub/{ JHUB_VER } -GCCcore-10.3.0 "
176
219
"jupyter-matlab-proxy/0.3.4-GCCcore-10.3.0 "
177
220
"MATLAB-Kernel/0.17.1-GCCcore-10.3.0 "
178
221
),
179
222
"path" : "" ,
180
223
"add_to_path" : False ,
181
- },
182
- "2021_dask" : {
183
- "description" : "2021a: Python v3.9.5 + dask" ,
184
- "modules" : (
185
- "JupyterHub/2.3.1-GCCcore-10.3.0 "
186
- "dask-labextension/5.3.1-foss-2021a "
187
- ),
188
- "path" : "" ,
189
- "add_to_path" : False ,
190
- },
191
- "2021_nglview" : {
192
- "description" : "2021a: Python v3.9.5 + nglview" ,
193
- "modules" : (
194
- "JupyterHub/2.3.1-GCCcore-10.3.0 "
195
- "nglview/3.0.3-foss-2021a "
196
- ),
197
- "path" : "" ,
198
- "add_to_path" : False ,
224
+ "group" : "Python v3.9.5" ,
199
225
},
200
226
}
201
227
@@ -302,7 +328,9 @@ def user_env(self, env):
302
328
c .SlurmSpawner .batch_cancel_cmd = "scancel {{job_id}} "
303
329
# protect argument quoting in squeque and sinfo sent through SSH
304
330
c .SlurmSpawner .batch_query_cmd = r"squeue -h -j {{job_id}} -o \'%T %B\' "
305
- c .MOSlurmSpawner .slurm_info_cmd = r"sinfo -a --noheader -o \'%R %D %C %G %m\'"
331
+ c .MOSlurmSpawner .slurm_info_cmd = (
332
+ r"sinfo -N -a --noheader -O \'PartitionName,StateCompact,CPUsState,Gres,GresUsed,Memory,Time\'"
333
+ )
306
334
307
335
# directly launch single-user server (without srun) to avoid issues with MPI software
308
336
# job environment is already reset before any step starts
0 commit comments