You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
For example, if we execute nvidia-docker run -v my_volume:/home my_image, and the driver volume nvidia_driver_xxx has not been created, nvidia-docker will expand the above command like: docker run --volume-driver=nvidia-docker -v nvidia_driver_xxx:/usr/local/nvidia:ro -v my_volume:/home my_image
Due to the added --volume-driver, the user-specified volume my_volume:/home will receive a "bad volume format" error.
Thus, will it be better to create nvidia driver volume seperately, i.e., expand nvidia-docker run to docker volume create + docker run if the driver volume doesn't exist?
Yes this is an issue with named volumes. There have been several discussions on the Docker issue tracker (e.g moby/moby#16069) and they recommend creating the volume manually first.
I'm not sure we want to hide the volume creation behind the run command. On the other hand, having users do docker volume create -d nvidia-docker --name nvidia_driver_XXX.XX is not ideal either
@3XX0 I do not get the point here. I have the volume nvidia_driver_384.66 already created by a previous docker-compose command, so now if I try
docker run -it --volume-driver=efs -v fs-xxxxxxx:/root --device=/dev/nvidiactl --device=/dev/nvidia-uvm --device=/dev/nvidia0 -v nvidia_driver_384.66:/usr/local/nvidia:ro --name darknet_gpu loretoparisi/darknet_gpu:1.0.1 bash
docker: Error response from daemon: create nvidia_driver_384.66: driver 'nvidia-docker' already has volume 'nvidia_driver_384.66': volume name must be unique.
I get the error. Of course I cannot remove that volume since it's in use:
nvidia-docker volume rm nvidia_driver_384.66
Error response from daemon: Unable to remove volume, volume still in use: remove nvidia_driver_384.66: volume is in use
So how to mount the nvidia volume driver to the new container?
@loretoparisi I think it's because your volume has been registered by the nvidia-docker driver. IIRC if you create it manually with the command above docker takes a sightly different path which should work.
Activity
3XX0 commentedon Jun 15, 2016
Yes this is an issue with named volumes. There have been several discussions on the Docker issue tracker (e.g moby/moby#16069) and they recommend creating the volume manually first.
I'm not sure we want to hide the volume creation behind the
runcommand. On the other hand, having users dodocker volume create -d nvidia-docker --name nvidia_driver_XXX.XXis not ideal eitherCreate nvidia driver volume seperately
Create nvidia driver volume seperately
Create nvidia driver volume seperately
loretoparisi commentedon Sep 22, 2017
@3XX0 I do not get the point here. I have the volume
nvidia_driver_384.66already created by a previousdocker-composecommand, so now if I tryI get the error. Of course I cannot remove that volume since it's in use:
So how to mount the nvidia volume driver to the new container?
3XX0 commentedon Sep 22, 2017
@loretoparisi I think it's because your volume has been registered by the
nvidia-dockerdriver. IIRC if you create it manually with the command above docker takes a sightly different path which should work.3XX0 commentedon Nov 14, 2017
Closing, there is no more volume in 2.0/master