forked from cassinyio/SwarmSpawner
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjupyter_config_command.py
More file actions
44 lines (31 loc) · 1.08 KB
/
jupyter_config_command.py
File metadata and controls
44 lines (31 loc) · 1.08 KB
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
# Configuration file for jupyterhub.
import os
c = get_config()
c.JupyterHub.spawner_class = "jhub.SwarmSpawner"
c.JupyterHub.authenticator_class = "jhubauthenticators.DummyAuthenticator"
c.DummyAuthenticator.password = "password"
c.JupyterHub.ip = "0.0.0.0"
c.JupyterHub.hub_ip = "0.0.0.0"
c.JupyterHub.cleanup_servers = False
# First pulls can be really slow, so let's give it a big timeout
c.SwarmSpawner.start_timeout = 60 * 5
c.SwarmSpawner.jupyterhub_service_name = "jupyterhub"
c.SwarmSpawner.networks = ["jupyterhub_default"]
c.SwarmSpawner.use_user_options = True
mounts = [{"type": "bind", "source": "/tmp", "target": "/home/jovyan/tmpdir"}]
c.SwarmSpawner.images = [
{
"image": "ucphhpc/slurm-notebook:latest",
"name": "Default jupyter notebook",
"command": "/bin/bash -c 'mkdir -p /home/jovyan/{tmpdir1,tempdir2}; "
"/usr/bin/supervisord'",
"mounts": mounts,
}
]
c.SwarmSpawner.container_spec = {
"args": [
"/usr/local/bin/start-singleuser.sh",
"--ServerApp.ip=0.0.0.0",
"--ServerApp.port=8888",
]
}