face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

CUDA driver version is insufficient for CUDA runtime version

Open ManojTauro opened this issue 7 years ago • 4 comments

  • face_recognition version:
  • Python version:3.6.3
  • Operating System:Ubuntu 16.04
  • CUDA: 9.1.85
  • NVIDIA-driver: 390.25

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. IMPORTANT: If your issue is related to a specific picture, include it so others can reproduce the issue.

I just executed first command from the documentation $ sudo face_recognition ./i_know ./identify

but it throws me an error like this:

Traceback (most recent call last): File "/usr/local/bin/face_recognition", line 7, in from face_recognition.cli import main File "/usr/local/lib/python2.7/dist-packages/face_recognition/init.py", line 7, in from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance File "/usr/local/lib/python2.7/dist-packages/face_recognition/api.py", line 24, in cnn_face_detector = dlib.cnn_face_detection_model_v1(cnn_face_detection_model) RuntimeError: Error while calling cudaGetDevice(&the_device_id) in file /tmp/pip-build-IQQgTo/dlib/dlib/dnn/gpu_data.cpp:178. code: 35, reason: CUDA driver version is insufficient for CUDA runtime version

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

ManojTauro avatar Feb 17 '18 06:02 ManojTauro

Typically that means the video driver module that is running doesn't match the version of the CUDA library on disk.

Maybe you applied an automatic Ubuntu update or something that got things out of sync. You might try just rebooting or worst case, re-installing the NVIDIA video driver and CUDA.

ageitgey avatar Feb 21 '18 00:02 ageitgey

@manu310397 , I also encountered this issue, it could caused by the automatic driver installation mismatch.

Normally you need to download the latest CUDA toolkit run file from nvidia develop website, if your video card is new, then you can found the driver number (say 418.56) in the first character screen.

After adding nvidia ppa source, and updating, you can find the driver list with key "TAB" after sudo apt install nvidia-, you will find relevant driver number (418 as example) in the list, then you can run command sudo apt install nvidia-*-418.

Then you can install CUDA, CUDNN, DLIB.

Eventually, you will find something like following output using nvidia-smi:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56       Driver Version: 418.56       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0  On |                  N/A |
|  0%   40C    P8    N/A /  80W |    935MiB /  4038MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1022      G   /usr/lib/xorg/Xorg                            26MiB |
|    0      1134      G   /usr/bin/gnome-shell                          47MiB |
|    0      1325      G   /usr/lib/xorg/Xorg                           204MiB |
|    0      1458      G   /usr/bin/gnome-shell                         196MiB |
|    0      2433      C   /usr/bin/python3.6                           455MiB |
+-----------------------------------------------------------------------------+

YanngLiu avatar Jun 09 '19 00:06 YanngLiu

I got same issues and solved it. refer to #1205 for further details

Professor-Paradox avatar Aug 24 '20 12:08 Professor-Paradox

@ageitgey @Professor-Paradox now 440 driver is not working anymore

arivudainambik avatar Feb 14 '22 19:02 arivudainambik