Skip to content

Commit

Permalink
lab default.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathematicalmichael committed Apr 11, 2019
1 parent c8e6eaf commit 59e1da6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def start(self):
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
Expand Down Expand Up @@ -89,7 +90,7 @@ def start(self):
# 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 }
Expand Down

0 comments on commit 59e1da6

Please sign in to comment.