everything now working from a centralized place.

This commit is contained in:
M. Pilosov 2019-01-03 14:39:12 -07:00
parent 46263c24e3
commit 0dc860068a
4 changed files with 11 additions and 8 deletions

2
.env
View File

@ -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

View File

@ -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

View File

@ -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' })

View File

@ -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