Using GMSL Camera in Docker

To run a GMSL camera inside Docker on Jetson, you must correctly bridge the camera devices into the container after Jetpack5.x

The two critical devices are:

  • --device /dev/media0:/dev/media0

  • --device /dev/capture-vi-channel0:/dev/capture-vi-channel0

Without these, the GMSL camera will not work inside Docker.


Basic Command

Use docker run with device mapping:

sudo docker run -it --rm --net=host \
  --device /dev/video0:/dev/video0 \
  --device /dev/media0:/dev/media0 \
  --device /dev/capture-vi-channel0:/dev/capture-vi-channel0 \
  --runtime nvidia \
  -e DISPLAY=$DISPLAY \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /lib/modules:/lib/modules \
  nvcr.io/nvidia/l4t-base:r35.2.1

Example: Jetson Inference Docker

If using Jetson Inference’s Docker run script, replace the camera mapping lines with the following:


#bp

Last updated