vjrantal / iot-edge-darknet-module

18 stars 8 forks source link

no CUDA-capable device is detected on Jetson TX2 running JetPack 3.2 #6

Closed mingqxu-zz closed 6 years ago

mingqxu-zz commented 6 years ago

After following the instructions for building the jetson tx2, wanting to just test whether the code runs standalone,

nvidia@tegra-ubuntu:~/Projects/iot-edge-darknet-module$ docker run vjrantal/iot-edge-darknet-module:latest layer filters size input output 0 python: ./src/cuda.c:36: check_error: Assertion `0' failed. CUDA Error: no CUDA-capable device is detected

I try to run python interactively to see whether the jetson onboard camera can be launched. I changed the last line of iot-edge-darknet-module/Dockerfile

from:

CMD ["python", "-u", "module.py"]

to

CMD ["python"]

and then invoke "docker run -it vjrantal/iot-edge-darknet-module:latest" Here is the session:

nvidia@tegra-ubuntu:~/Projects/iot-edge-darknet-module$ docker run -it vjrantal/iot-edge-darknet-module:latest Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import os import cv2 import json import time video_capture = cv2.VideoCapture(0) capture = video_capture.read() print capture[0] False

from detector import Detector detector = Detector() layer filters size input output 0 CUDA Error: no CUDA-capable device is detected python: ./src/cuda.c:36: check_error: Assertion `0' failed.

Let me know whether there is any additional information you require to perform diagnostics. Thank you very much in anticipation of your help!

mingqxu-zz commented 6 years ago

session.txt

vjrantal commented 6 years ago

@mingqxu Thanks for your interest towards the project.

This issue is probably due to running without the privileged flag. So add this to the run command:

docker run --privileged ...

Let me know if this helps and if yes, we can close this issue.

mingqxu-zz commented 6 years ago

Yes, the issue is resolved. Thank you very much for your prompt reply and help!