Last active
January 30, 2021 01:59
-
-
Save atinfinity/2ba992ab36af02543f91d739ae5ace64 to your computer and use it in GitHub Desktop.
script to use depthai(gen2_develop) on Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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