GMSL Camera within docker not working


I am trying to run the software sample_camera_gmsl inside the docker on the PX2. Outside the docker the sample is working fine.

This is how I run the docker:


docker run -it --rm --net=host \
--device=/dev/nvhost-ctrl --device=/dev/nvhost-ctrl-gpu --device=/dev/nvhost-prof-gpu --device=/dev/nvmap --device=/dev/nvhost-gpu --device=/dev/nvhost-as-gpu --device /dev/nvgpu-pci \
-v /usr/local/driveworks:/usr/local/driveworks -v /usr/local/driveworks-1.2:/usr/local/driveworks-1.2 -v /usr/lib/pkgconfig/driveworks.pc:/usr/lib/pkgconfig/driveworks.pc -v /etc/tacp:/etc/tacp \
-v /usr/local/cuda:/usr/local/cuda -v /usr/local/cuda-9.2:/usr/local/cuda-9.2  \
-v /home/nvidia/catkin_ws:/home/$USER/catkin_ws \
-v /usr/lib/ $(\ls /usr/lib/libnv* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib/aarch64-linux-gnu/libnv* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib/aarch64-linux-gnu/libcudnn* | xargs -I{} echo '-v {}:{}') \
-v /usr/lib/ \
-v /home/nvidia/docker/:/test \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-v /home/$USER/.Xauthority:/home/$USER/.Xauthority:rw \
--privileged \
test:arm \

In the host I execute the following command:

xhost +local:root

Inside the docker I added the cuda libraries to the path:

export PATH=/usr/local/cuda-9.2/bin:$PATH && export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64

And this is the error that I get running the sample:

root@tegra-ubuntu:/usr/local/driveworks/bin# ./sample_camera_gmsl
[3-5-2019 3:30:25] Initialize DriveWorks SDK v1.2.400
[3-5-2019 3:30:25] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[3-5-2019 3:30:25] Platform: Detected Drive PX2 - Tegra A
[3-5-2019 3:30:25] TimeSource: monotonic epoch time offset is 1556820641028436
[3-5-2019 3:30:25] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[3-5-2019 3:30:25] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.
[3-5-2019 3:30:25] Platform: number of GPU devices detected 2
[3-5-2019 3:30:25] Platform: currently selected GPU device discrete ID 0
[3-5-2019 3:30:25] SDK: Resources mounted from .././data/resources
[3-5-2019 3:30:25] SDK: Create NvMediaDevice
[3-5-2019 3:30:25] SDK: Create NvMediaIPPManager
[3-5-2019 3:30:25] SDK: use EGL display as provided
[3-5-2019 3:30:25] SensorFactory::createSensor() -> camera.gmsl, output-format=yuv,fifo-size=3,camera-type=ar0231-rccb-bae-sf3324,csi-port=a,slave=0
[3-5-2019 3:30:25] CameraGMSL: required FPS = 30, resolution = 1920x1208
nvmedia isc: IscPwrCtrlLoadLib: 932:  Failed to load power control lib
iscRootDevOpen: Failed to load power control lib
NvMediaISCRootDeviceCreate: Unable to open root device
nvmedia: ERROR: Init: Failed to create NvMedia ISC root device
[3-5-2019 3:30:25] Driveworks exception thrown: DW_SAL_CANNOT_CREATE_SENSOR: CameraGMSL: cannot connect to camera

terminate called after throwing an instance of 'std::runtime_error'
  what():  [2019-05-03 03:30:25] DW Error DW_SAL_CANNOT_CREATE_SENSOR executing DW function:
 dwSAL_createSensor(&m_camera, params, m_sal)
 at /builds/driveav/dw/sdk/samples/sensors/camera_gmsl/main.cpp:153
Aborted (core dumped)

Have you any suggestion to solve this problem?


Dear jokla,
Are you using Sekonix Sf3324 camera connected to A0 port?
Also, could you check ldd of executable to see if all libs are mapping correctly.
Try running some other sample to confirm if the issue is only with accessing GMSL camera


I have the same problem. Have you managed to make it work?