This command also demonstrates "bind volume mount", transferring webcam device to container, port transfer and x11 linux graphic server.
nvidia-docker run -it --device=/dev/video0:/dev/video0 --user=$(id -u $USER):$(id -g $USER) -p=5000:5000 -v /etc/passwd:/etc/passwd -v /etc/group:/etc/group -v /etc/shadow:/etc/shadow -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/jyotendra/project/DeepStream/sample-scripts:/root/ -e DISPLAY=$DISPLAY -w /root 94a
The following volumes are mounted so as to help with initiating container as non-root user:
- /etc/passwd