diff --git a/.env b/.env index fd28048..06a95e0 100755 --- a/.env +++ b/.env @@ -22,7 +22,7 @@ DOCKER_NETWORK_NAME=jupyterhub-network DOCKER_NOTEBOOK_IMAGE=jupyter/scipy-notebook # the local image we use, after pinning jupyterhub version -LOCAL_NOTEBOOK_IMAGE=datascience-user +LOCAL_NOTEBOOK_IMAGE=jupyterhub-user # Notebook directory in the container. # This will be /home/jovyan/work if the default diff --git a/Dockerfile.jupyterhub b/Dockerfile.jupyterhub index b466f76..1d1b4f9 100755 --- a/Dockerfile.jupyterhub +++ b/Dockerfile.jupyterhub @@ -7,10 +7,9 @@ FROM jupyterhub/jupyterhub-onbuild:$JUPYTERHUB_VERSION RUN /opt/conda/bin/conda install -yq psycopg2=2.7 && \ /opt/conda/bin/conda clean -tipsy && \ /opt/conda/bin/pip install --no-cache-dir \ - oauthenticator==0.8.* \ - dockerspawner==0.9.* + oauthenticator==0.8.* -RUN pip install jupyterhub-hashauthenticator +RUN pip install jupyterhub-hashauthenticator git+https://github.com/jupyterhub/dockerspawner.git@master # Copy TLS certificate and key #ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt diff --git a/jupyterhub_config.py b/jupyterhub_config.py index d613634..5908efc 100755 --- a/jupyterhub_config.py +++ b/jupyterhub_config.py @@ -13,7 +13,11 @@ c = get_config() # Spawn single-user servers as Docker containers c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner' # Spawn containers from this image -c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE'] +#c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE'] +c.DockerSpawner.image_whitelist = {'default': "jupyterhub-user", + 'scipy': "jupyter/scipy-notebook", + 'datascience': "jupyter/datascience-notebook", + 'base': "jupyter/base-notebook"} #c.DockerSpawner.container_image = "jupyter/datascience-notebook:7254cdcfa22b" # JupyterHub requires a single-user instance of the Notebook server, so we @@ -25,7 +29,7 @@ spawn_cmd = os.environ.get('DOCKER_SPAWN_CMD', "start-singleuser.sh") c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd }) # Memory limit -c.Spawner.mem_limit = '1G' +c.Spawner.mem_limit = '2G' # Connect containers to this Docker network network_name = os.environ['DOCKER_NETWORK_NAME'] @@ -45,7 +49,7 @@ c.DockerSpawner.notebook_dir = notebook_dir # c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir } c.DockerSpawner.volumes = { 'power-user-{username}': notebook_dir, - '/home/michael/repos/':'/home/shared/' } + '/home/mpilosov/Packages/BET':'/home/jovyan/work/shared/' } # volume_driver is no longer a keyword argument to create_container() # c.DockerSpawner.extra_create_kwargs.update({ 'volume_driver': 'local' }) diff --git a/singleuser/Dockerfile b/singleuser/Dockerfile index 8e63e35..fc2a33f 100755 --- a/singleuser/Dockerfile +++ b/singleuser/Dockerfile @@ -13,4 +13,4 @@ RUN apt-get update && \ USER jovyan RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION nbresuse - +RUN conda install -c conda-forge fenics