lab default.
This commit is contained in:
parent
c8e6eafa3a
commit
59e1da6c6c
2
.env
2
.env
@ -12,7 +12,7 @@ JUPYTERHUB_VERSION=0.9.4
|
|||||||
# Assign a port for the hub to be hosted on.
|
# Assign a port for the hub to be hosted on.
|
||||||
# To check the ports that are in use, run `docker ps`.
|
# To check the ports that are in use, run `docker ps`.
|
||||||
# Generally, picking a random number between 8000-9999 won't be an issue.
|
# Generally, picking a random number between 8000-9999 won't be an issue.
|
||||||
PORT_NUM=8000
|
PORT_NUM=8001
|
||||||
HUB_NAME=math
|
HUB_NAME=math
|
||||||
|
|
||||||
# Name of Docker network
|
# Name of Docker network
|
||||||
|
@ -46,6 +46,7 @@ class MyDockerSpawner(DockerSpawner):
|
|||||||
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
if self.user.name == 'hub-admin': # if admin, allow userlist access
|
||||||
self.volumes[os.path.join(pwd,'userlist')] = { 'bind': '/home/jovyan/userlist',
|
self.volumes[os.path.join(pwd,'userlist')] = { 'bind': '/home/jovyan/userlist',
|
||||||
'mode': 'rw' }
|
'mode': 'rw' }
|
||||||
|
self.environment['JUPYTER_ENABLE_LAB'] = 'yes'
|
||||||
return super().start()
|
return super().start()
|
||||||
|
|
||||||
c.JupyterHub.spawner_class = MyDockerSpawner
|
c.JupyterHub.spawner_class = MyDockerSpawner
|
||||||
@ -89,7 +90,7 @@ c.DockerSpawner.extra_host_config = { 'network_mode': network_name }
|
|||||||
# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
|
# user `jovyan`, and set the notebook directory to `/home/jovyan/work`.
|
||||||
# We follow the same convention.
|
# We follow the same convention.
|
||||||
notebook_dir = os.environ.get('DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
|
notebook_dir = os.environ.get('DOCKER_NOTEBOOK_DIR') or '/home/jovyan/work'
|
||||||
c.DockerSpawner.notebook_dir = notebook_dir
|
#c.DockerSpawner.notebook_dir = notebook_dir
|
||||||
# Mount the real user's Docker volume on the host to the notebook user's
|
# Mount the real user's Docker volume on the host to the notebook user's
|
||||||
# notebook directory in the container
|
# notebook directory in the container
|
||||||
c.DockerSpawner.volumes = { 'hub-user-{username}': notebook_dir }
|
c.DockerSpawner.volumes = { 'hub-user-{username}': notebook_dir }
|
||||||
|
Loading…
Reference in New Issue
Block a user