Jupyterhub Docker Spawner Shared Folder for all users

I tried to open an issue on the Jupyterhub/dockerspawner github repo but was asked to post it here. I have deployed Jupyterhub on an EC2 instance and use dockerspawner for spawners. I also use ldapauthenticator for authentication. I would like to have a fully working jupyterhub server for my data scientists to use. The requirements are below:
Jupyterhub server should allow user to authenticate using their ldap credentials. There should also be a shared notebook folder that is visible to all users so they can shared notebooks. I have have figured everything except the shared folder part and appreciate if someone can help me figure it out. My config.py is below:


Automatically add and mount remote folder for persistence data for each user

and bind to the container


import os
def create_dir_hook(spawner):
“”" Create directory “”"
username = spawner.user.name # get the username
script_path = os.path.join(config_dir, “add_user.sh”)
subprocess.check_call([‘bash’, script_path, username])

c.Spawner.pre_spawn_hook = create_dir_hook
notebook_dir = os.environ.get(‘DOCKER_NOTEBOOK_DIR’) or ‘/home/jovyan/work’
shared_notebook_dir = ‘/home/team/shared’
c.DockerSpawner.notebook_dir = notebook_dir

c.DockerSpawner.volumes = { ‘/home/domain/{username}/’: notebook_dir}


Add a shared voulme


from dockerspawner import DockerSpawner
class MyDockerSpawner(DockerSpawner):
def start(self):
# username is self.user.name
team = ‘myteam’
# add team volume to volumes
self.volumes[‘jupyterhub-team-{}’.format(team)] = {
‘bind’: ‘/home/shared/{}’.format(team),
‘mode’: ‘rw’, # or ro for read-only
return super().start()

c.JupyterHub.spawner_class = MyDockerSpawner

User is able to sign in and spawn a notebook server however they are not able to see the shared_notebook folder.