Hi,
I'm trying to install jupyterhub with spawnerdocker using a separate docker 
server.
Jupyterhub is installed on server A (10.16.3.10) and docker on server B 
(10.16.5.12).

JupyterHub use following config (docker part):
allowImages = {
   'BaseNB': 'jupyter/base-notebook:latest',
   'R_NB': 'jupyter/r-notebook:latest'
}

c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
c.DockerSpawner.image_whitelist = allowImages

c.DockerSpawner.extra_create_kwargs.update({'user': 'root'})
c.DockerSpawner.client_kwargs.update({'base_url': 'tcp://10.16.3.12:2376'})
spawn_cmd = "start-singleuser.sh"
c.DockerSpawner.extra_create_kwargs.update({'command': spawn_cmd})
# Connect containers to this Docker network
network_name = 'host'
c.DockerSpawner.network_name = network_name
c.DockerSpawner.extra_host_config = {'network_mode': network_name}

notebook_dir = '/home/jovyan/work'
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
prefix = 'jupyterhub-user'
c.DockerSpawner.volumes = {
   'jupyterhub-data': '/etc/jupyter/data',
   'jupyterhub-common': '/home/jovyan/common',
   prefix+'-{username}': notebook_dir
}

# Remove containers once they are stopped
c.DockerSpawner.remove_containers = True
# For debugging arguments passed to spawned containers
c.DockerSpawner.debug = True

# User containers will access hub by container name on the Docker network
c.DockerSpawner.host_ip = '10.16.3.12'

c.JupyterHub.hub_ip = '10.16.3.10'
c.JupyterHub.hub_port = 8080



As I set nteworkName to host, I changed function get_ip_and_port in 
dowkespawner.py
@gen.coroutine
def get_ip_and_port(self):
   return self.host_ip, self.port


I can create and start a NB container from Jupyterhub ans for a authorized 
user.
But when I second user try to start a NB, it failed : with a 404 page.

I guess there is something wrong in my config, but what ?
Thanks for you help ! :-)

Pierre

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/7bbaeb65-69fd-4109-937c-e72883af74f6o%40googlegroups.com.

Reply via email to