First, I would like to thank you Jetson Nano DLI course teem, and Nvidia for such a valuable course.
I am trying to run CSI camera inside the course container, but I am not able to run the CSI camera inside the container.
Jetson Nano used version B01 (the one comes with two CSI camera slots)
Camera used : CSI camera (Raspberry Pi camera V2.1)
The camera is connected to the first slot.
Docker run command:
sudo docker run --runtime nvidia -it --rm --network host --volume ~/nvdli-data:/nvdli-nano/data --device /dev/video0 nvcr.io/nvidia/dli/dli-nano-ai:v2.0.0-r32.4.3
checking camera command works fine
!ls -ltrh /dev/video*
crw-rw---- 1 root video 81, 0 Oct 19 19:00 /dev/video0
Initializing the camera does not work
from jetcam.csi_camera import CSICamera
camera = CSICamera(width=224, height=224)
It is giving me this error:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in __init__(self, *args, **kwargs)
23 if not re:
---> 24 raise RuntimeError('Could not read image from camera.')
25 except:
RuntimeError: Could not read image from camera.
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
<ipython-input-2-dae08cdf7ca7> in <module>
1 from jetcam.csi_camera import CSICamera
2
----> 3 camera = CSICamera(width=224, height=224)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/csi_camera.py in __init__(self, *args, **kwargs)
25 except:
26 raise RuntimeError(
---> 27 'Could not initialize camera. Please see error trace.')
28
29 atexit.register(self.cap.release)
RuntimeError: Could not initialize camera. Please see error trace.
Even though the camera works fine on the jetson outside the container. I cloned the Jetcam repo and run the notebook outside the container. it worked fine.
Could you please help me with this issue!?
Also, I hope you open a special section for DLI course issues so it becomes easier to search for all issues in one place.