ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.18k stars 13.47k forks source link

CUDA driver version is insufficient for CUDA runtime version #364

Open manu310397 opened 6 years ago

manu310397 commented 6 years ago

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.
ageitgey commented 6 years ago

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.

YanngLiu commented 5 years ago

@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 |
+-----------------------------------------------------------------------------+
Professor-Paradox commented 4 years ago

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

arivudainambik commented 2 years ago

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