darknet_ros: CUDA Error: no CUDA-capable device is detected

`0 CUDA Error: no CUDA-capable device is detected CUDA Error: no CUDA-capable device is detected: Bad file descriptor [darknet_ros-1] process has died [pid 15933, exit code -6, cmd /home/zaphkiel/catkin_ws/devel/lib/darknet_ros/darknet_ros __name:=darknet_ros __log:=/home/zaphkiel/.ros/log/c17b16f2-4839-11eb-aa2e-f0038c4d290f/darknet_ros-1.log]. log file: /home/zaphkiel/.ros/log/c17b16f2-4839-11eb-aa2e-f0038c4d290f/darknet_ros-1*.log

` how can i fix this error?

Ekran Görüntüsü - 2020-12-27 15-07-03

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

I didn’t use a special method… It was solved by installing the driver according to the gpu version I am using. It seems that cuda and cudnn are installed according to the driver. So, in my case, I wanted to install the old versions of cuda and cudnn, but since the gpu is gtx1080, relatively latest version of the driver was installed and cuda and cudnn were automatically upgraded. As a result, it was resolved by completely removing cuda, driver, and cudnn, and installing all three by entering the desired version directly. There is nothing I can advise other than this…

If you don’t have / want to use a NVidia GPU, don’t install CUDA on your system.

Try commenting out line 17 https://github.com/leggedrobotics/darknet_ros/blob/master/darknet_ros/CMakeLists.txt#L17 of the CMakeLists.txt when you get CUDA errors but you don’t have a CUDA GPU.

If you do see output, like @leeisack , then you actually should not get this error. Try running darknet with the following environment variable set:

CUDA_VISIBLE_DEVICES=0, this will instruct CUDA to only make the first device visible.

(In a single bash session for example, run export CUDA_VISIBLE_DEVICES=0)

If you don’t want to use GPU, you can delete “find_ package(CUDA QUIET)” in Cmakelists

I am having this same error as well. I am using VMWare with Ubuntu 18.04. Is there a way to run darknet without needing a CUDA GPU?