nvidia-docker icon indicating copy to clipboard operation
nvidia-docker copied to clipboard

Unable to use older cuda versions in cuda 11 host system on devel image.

Open mayug opened this issue 5 years ago • 2 comments

1. Issue or feature description

I am trying to use nvidia/cuda:10.2-devel-ubuntu16.04 on my host system which has CUDA 11, but nvidia-smi within the container shows that the cuda version is 11.

2. Steps to reproduce the issue

sudo docker run --rm --gpus all nvidia/cuda:10.2-devel-ubuntu16.04 nvidia-smi

nvidia-smi on host as well as in docker shows 11.4. I want to use 10.2 cuda driver within the container.

sudo docker run -it --gpus all nvidia/cuda:10.2-devel-ubuntu16.04 nvidia-smi
Mon Oct  4 09:51:14 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:08:00.0 Off |                  N/A |
|  0%   41C    P8    17W / 220W |    202MiB /  7972MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

3. Information

nvidia-toolkit

ii  libnvidia-container-tools                  1.5.1-1                               amd64        NVIDIA container runtime library (command-line tools)
ii  libnvidia-container1:amd64                 1.5.1-1                               amd64        NVIDIA container runtime library
ii  nvidia-container-runtime                   3.5.0-1                               amd64        NVIDIA container runtime
ii  nvidia-container-toolkit                   1.5.1-1                               amd64        NVIDIA container runtime hook

kernel

5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linu

host driver

Mon Oct  4 10:45:55 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:08:00.0 Off |                  N/A |
|  0%   41C    P8    17W / 220W |    202MiB /  7972MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       978      G   /usr/lib/xorg/Xorg                 35MiB |
|    0   N/A  N/A      1802      G   /usr/lib/xorg/Xorg                116MiB |
|    0   N/A  N/A      1930      G   /usr/bin/gnome-shell               10MiB |
|    0   N/A  N/A      2313      G   ...mviewer/tv_bin/TeamViewer        3MiB |
|    0   N/A  N/A      4591      G   ...AAAAAAAAA= --shared-files       23MiB |

docker version

Client: Docker Engine - Community
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:54:27 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:52:33 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.10
  GitCommit:        8848fdb7c4ae3815afcc990a8a99d663dda1b590
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

nvidia container version

version: 1.5.1
build date: 2021-09-20T14:30+00:00
build revision: 4afad130c4c253abd3b2db563ffe9331594bda41
build compiler: x86_64-linux-gnu-gcc-7 7.5.0
build platform: x86_64
build flags: -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -DNDEBUG -std=gnu11 -O2 -g -fdata-sections -ffunction-sections -fstack-protector -fno-strict-aliasing -fvisibility=hidden -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections

I use an RTX3070.

So,

  1. Am I missing something or is this a bug?

Thank you

mayug avatar Oct 04 '21 09:10 mayug

https://stackoverflow.com/a/53504578 to check the cuda version you should care about use nvcc --version

PQLLUX avatar Oct 04 '21 12:10 PQLLUX

Thanks a lot. I now see the version as 10.2.

mayug avatar Oct 04 '21 17:10 mayug