shared directories working now.
This commit is contained in:
parent
293edb616c
commit
bd0428ae02
2
Makefile
2
Makefile
@ -11,6 +11,8 @@ network:
|
||||
volumes:
|
||||
@docker volume inspect $(DATA_VOLUME_HOST) >/dev/null 2>&1 || docker volume create --name $(DATA_VOLUME_HOST)
|
||||
@docker volume inspect $(DB_VOLUME_HOST) >/dev/null 2>&1 || docker volume create --name $(DB_VOLUME_HOST)
|
||||
@docker volume inspect ro_shared_volume >/dev/null 2>&1 || docker volume create --name ro_shared_volume
|
||||
@docker volume inspect rw_shared_volume >/dev/null 2>&1 || docker volume create --name rw_shared_volume
|
||||
|
||||
secrets/postgres.env:
|
||||
@echo "Generating postgres password in $@"
|
||||
|
@ -35,7 +35,7 @@ c.DockerSpawner.extra_create_kwargs.update({ 'command': spawn_cmd })
|
||||
|
||||
# Memory limit
|
||||
c.Spawner.mem_limit = '2G' # RAM limit
|
||||
c.Spawner.cpu_limit = 2.0 # limit on number of cores
|
||||
|
||||
# Connect containers to this Docker network
|
||||
network_name = os.environ['DOCKER_NETWORK_NAME']
|
||||
c.DockerSpawner.use_internal_ip = True
|
||||
@ -54,7 +54,9 @@ c.DockerSpawner.notebook_dir = notebook_dir
|
||||
|
||||
# c.DockerSpawner.volumes = { 'jupyterhub-user-{username}': notebook_dir }
|
||||
c.DockerSpawner.volumes = { 'hub-user-{username}': notebook_dir,
|
||||
'/home/shared':'/home/jovyan/work/shared/' }
|
||||
'ro_shared_volume':{"bind": '/home/jovyan/shared_volume_ro', "mode": "ro"},
|
||||
'rw_shared_volume':{"bind": '/home/jovyan/shared_volume_rw', "mode": "rw", "propagation": "rshared"},
|
||||
'/home/shared/':'/home/jovyan/shared_directory/' }
|
||||
|
||||
# volume_driver is no longer a keyword argument to create_container()
|
||||
# c.DockerSpawner.extra_create_kwargs.update({ 'volume_driver': 'local' })
|
||||
|
Loading…
Reference in New Issue
Block a user