Reputation: 1166
I'm trying to run a docker container with GPU access and one that does not remove itself when it exits.
I'm trying nvidia-docker run -it -v ~/dir/to/my/data:/data nvidia-smi
but it tells me:
Unable to find image 'nvidia-smi:latest' locally
docker: Error response from daemon: pull access denied for nvidia-smi, repository does not exist or may require 'docker login'.
See 'docker run --help'.
Now I have checked zaproxy: unable to find image 'in:latest' locally this question and (even though I do think my problem is a little different) tried nvidia-docker run -it -v '~/dir/to/my/data':/data nvidia-smi
only to get the same error.
I have also created a docker account and logged in with docker login
but it doesn't seem to do me any good.
How can I solve this problem? Any help or push in the right direction would be greatly appreciated.
Thanks!
Upvotes: 0
Views: 11156
Reputation: 11
Go to the site below to find your cuda version for ubuntu:
https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda
for me,the cuda is 12.2.0-devel-ubuntu22.04 and add it to command:
docker run --runtime=nvidia --rm nvidia/cuda:12.2.0-devel-ubuntu20.04 nvidia-smi
OUTPUT:
Unable to find image 'nvidia/cuda:12.2.0-devel-ubuntu20.04' locally
12.2.0-devel-ubuntu20.04: Pulling from nvidia/cuda
56e0351b9876: Already exists
50292f59408b: Pull complete
bac1f8a1c195: Pull complete
...some pull complete I emit
CUDA Version 12.2.0
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
some GPU info I emit some segment
| 0 NVIDIA TITAN RTX Off | 00000000:5E:00.0 Off | N/A |
| 40% 35C P8 11W / 280W | 12MiB / 24576MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
Upvotes: 1
Reputation: 34704
You are missing the Docker image name in your command. nvidia-smi
is the command name, not the image name. Add nvidia/cuda:9.0-base
right before it. That's a Docker image that exists.
nvidia-docker run -it -v ~/dir/to/my/data:/data nvidia/cuda:9.0-base nvidia-smi
Upvotes: 3