Skip to content

Instantly share code, notes, and snippets.

@atinfinity
Last active January 30, 2021 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atinfinity/2ba992ab36af02543f91d739ae5ace64 to your computer and use it in GitHub Desktop.
Save atinfinity/2ba992ab36af02543f91d739ae5ace64 to your computer and use it in GitHub Desktop.
script to use depthai(gen2_develop) on Docker container
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
docker run --privileged --rm -it \
--volume=$XSOCK:$XSOCK:rw \
--volume=$XAUTH:$XAUTH:rw \
--volume=/dev/bus/usb:/dev/bus/usb \
--shm-size=1gb \
--env="XAUTHORITY=${XAUTH}" \
--env="DISPLAY=${DISPLAY}" \
--env=TERM=xterm-256color \
--env=QT_X11_NO_MITSHM=1 \
--device-cgroup-rule='c 189:* rmw' \
luxonis/depthai-library:latest \
python3 /depthai-python/examples/01_rgb_preview.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment