You are not logged in.

#1 2021-08-17 02:38:20

lyxzcx
Member
Registered: 2021-08-13
Posts: 51

[Solved]Failed to initialize NVML: Unknown Error

I try to use docker and  nvidia-container-toolkit.However,GPU can't be used in docker.
Here are my records:


Li% nvidia-smi
Tue Aug 17 10:31:22 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:01:00.0 Off |                  N/A |
| N/A   43C    P0    15W /  N/A |      5MiB /  5946MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       613      G   /usr/lib/Xorg                       4MiB |
+-----------------------------------------------------------------------------+
Li% lspci | grep -i nvidia                                         
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 228e (rev a1)


Li% docker run --gpus all -it tensorflow/tensorflow:latest-gpu bash

________                               _______________               
___  __/__________________________________  ____/__  /________      __
__  /  _  _ \_  __ \_  ___/  __ \_  ___/_  /_   __  /_  __ \_ | /| / /
_  /   /  __/  / / /(__  )/ /_/ /  /   _  __/   _  / / /_/ /_ |/ |/ /
/_/    \___//_/ /_//____/ \____//_/    /_/      /_/  \____/____/|__/


WARNING: You are running this container as root, which can cause new files in
mounted volumes to be created as the root user on your host machine.

To avoid this, run the container by specifying your user's userid:

$ docker run -u $(id -u):$(id -g) args...

root@7950aa335964:/# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_14_21:12:58_PST_2021
Cuda compilation tools, release 11.2, V11.2.152
Build cuda_11.2.r11.2/compiler.29618528_0
root@7950aa335964:/# nvidia-smi
Failed to initialize NVML: Unknown Error

Last edited by lyxzcx (2021-08-17 12:29:36)

Offline

#2 2021-08-17 11:05:34

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: [Solved]Failed to initialize NVML: Unknown Error


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#3 2021-08-17 12:29:16

lyxzcx
Member
Registered: 2021-08-13
Posts: 51

Re: [Solved]Failed to initialize NVML: Unknown Error

Amazing, thank you!

Offline

Board footer

Powered by FluxBB