From 59e1da6c6cd7f9434dd5c78c33c20d8b8458cb37 Mon Sep 17 00:00:00 2001 From: Michael Pilosov Date: Wed, 10 Apr 2019 18:51:04 -0600 Subject: [PATCH] lab default. --- .env | 2 +- jupyterhub_config.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 58784ec..3fa88f0 100755 --- a/.env +++ b/.env @@ -12,7 +12,7 @@ JUPYTERHUB_VERSION=0.9.4 # Assign a port for the hub to be hosted on. # To check the ports that are in use, run `docker ps`. # Generally, picking a random number between 8000-9999 won't be an issue. -PORT_NUM=8000 +PORT_NUM=8001 HUB_NAME=math # Name of Docker network diff --git a/jupyterhub_config.py b/jupyterhub_config.py index 8244e5c..c60ef6d 100755 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -46,6 +46,7 @@ class MyDockerSpawner(DockerSpawner): if self.user.name == 'hub-admin': # if admin, allow userlist access self.volumes[os.path.join(pwd,'userlist')] = { 'bind': '/home/jovyan/userlist', 'mode': 'rw' } + self.environment['JUPYTER_ENABLE_LAB'] = 'yes' return super().start() 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`. # We follow the same convention. 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 # notebook directory in the container c.DockerSpawner.volumes = { 'hub-user-{username}': notebook_dir }