enable_options

This commit is contained in:
mathematicalmichael 2019-01-04 17:30:41 -07:00
parent bc63e7af95
commit 293edb616c

View File

@ -13,15 +13,17 @@ c = get_config()
# Spawn single-user servers as Docker containers # Spawn single-user servers as Docker containers
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner' c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
# Spawn containers from this image (or a whitelist) # Spawn containers from this image (or a whitelist)
#c.DockerSpawner.container_image = "jupyter/datascience-notebook:7254cdcfa22b"
c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE'] c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE']
# if whitelist enabled, the above line will be ignored in favor of the options below: enable_options=False
if enable_options:
# if whitelist enabled, the .container_image will be ignored in favor of the options below:
c.DockerSpawner.image_whitelist = {'fenics': "jupyterhub-user", c.DockerSpawner.image_whitelist = {'fenics': "jupyterhub-user",
'scipy-notebook': "jupyter/scipy-notebook", 'scipy-notebook': "jupyter/scipy-notebook",
'datascience-notebook': "jupyter/datascience-notebook", 'datascience-notebook': "jupyter/datascience-notebook",
'r-notebook': 'jupyter/r-notebook', 'r-notebook': 'jupyter/r-notebook',
'base-notebook': "jupyter/base-notebook", 'base-notebook': "jupyter/base-notebook",
'RStudio': 'rstudio'} 'RStudio': 'rstudio'}
# #c.DockerSpawner.container_image = "jupyter/datascience-notebook:7254cdcfa22b"
# JupyterHub requires a single-user instance of the Notebook server, so we # JupyterHub requires a single-user instance of the Notebook server, so we
# default to using the `start-singleuser.sh` script included in the # default to using the `start-singleuser.sh` script included in the