SwarmSpawner + docker Volume + NFS

I want to address NFS area by using Volume with Docker/Swarm (SwarmSpawner)

I can get something to run if I create (via CLI) a docker volume
I mean : docker volume create --driver local --opt type=nfs --opt o=addr=…
Then can check (docker volume inspect) that the volume is ok

and then in my jypyterhub_config.py, in pre_spawn_hook, I use volume with :
mount = [{
‘type’: ‘volume’,
‘source’: ‘jupyterhub-user-{}’.format(spawner.user.name),
‘target’: ‘/home/{}’.format(spawner.user.name),

This is ok (from spawned notebook, I can address files in NFS area)

My question is :
Is it possible to have a dynamic creation of volume, per user and by using something like :
mount = [{
‘type’: ‘volume’,
‘source’: ‘jupyterhub-user-{}’.format(spawner.user.name),
‘target’: ‘/home/{}’.format(spawner.user.name),
‘no_copy’ : True,
‘driver_config’ : {
‘name’: ‘local’,
‘options’ : {
‘type’ : ‘nfs’,
‘o’ : ‘addr=*************,nfsvers=4,rw,async’,
‘device’ : ‘:/var/nfs/{}’.format(spawner.user.name),

When I try this config, in pre_spawn_hook, a volume is created, but it is NOT related to NFS like if ‘driver_config’ section wasn’t taken into account.
Is this available for SwarmSpawner or not ?
Must docker volume mandatorily be created before spawning notebook ?
Best regards

I have the same problem. The output of docker service inspect <spawned service> contains

"Mounts": [
        "Type": "volume",
        "Target": "/mnt"

but ignores the value of driver_config as mentioned in the OP.

Does someone have a solution to mount an NFS to the spawned service using the SwarmSpawner?