Closed hongyi-zhao closed 3 years ago
You need a comma after the line:
"dns" : ["172.17.0.1"]
Regarding:
And furthermore, even I don't set the "runtimes" section in the /etc/docker/daemon.json, the base CUDA container testing still can succeed as shown below:
Yes, if you run with the --gpus
option, you don't need to actually install nvidia-docker2
, but rather just nvidia-container.-toolkit
. At this point, nvidia-docker2
is mostly necessary only if you plan on using it in a Kubernetes cluster (because there is no way to pass --gpus
down to docker from within Kubernetes).
Thank you so much for highlighting my mistake and offering such thorough explanations.
also, i believe "runtimes": { "nvidia": { "args": [], "path": "nvidia-container-runtime" } } is how you would pass args, not "runtimesArgs". I'm a newb so maybe ignore me if there are 2 acceptable values but mine only had "args" :)
args
is the correct entry. Note that nvidia-docker
is deprecated and no longer installs / overwrites the daemon.json
file. This should be configured manually after installing the nvidia-container-toolkit
package(s) using the nvidia-ctk
command.
See https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
I'm on Ubuntu 20.04, and I installed the nvidia-docker according to the installation guide. I write the following script for this job:
But the last command failed and, as a result, the docker service is no longer working anymore. After the installation of nvidia-docker2, I've the following content in the /etc/docker/daemon.json:
But with the above settings, the docker service won't continue to work anymore:
OTOH, if I remove the "runtimes" settings from the /etc/docker/daemon.json file, i.e., as below, the docker service will be able to work again.
And furthermore, even I don't set the "runtimes" section in the /etc/docker/daemon.json, the base CUDA container testing still can succeed as shown below:
The detail nvidia driver and cuda info are shown as below:
So, I wan to know whether I really should add the "runtimes" settings of nvidia-docker for docker in its daemon config file, i.e., /etc/docker/daemon.json.
Any hints for this problem will be highly appreciated?
Regards, HY