openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
767 B

#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
cd $DIR
# expose X to the container
xhost +local:root
docker pull ghcr.io/commaai/openpilot-sim:latest
OPENPILOT_DIR="/openpilot"
if ! [[ -z "$MOUNT_OPENPILOT" ]]
then
OPENPILOT_DIR="$(dirname $(dirname $DIR))"
EXTRA_ARGS="-v $OPENPILOT_DIR:$OPENPILOT_DIR -e PYTHONPATH=$OPENPILOT_DIR:$PYTHONPATH"
fi
docker run --net=host\
--name openpilot_client \
--rm \
-it \
--gpus all \
--device=/dev/dri:/dev/dri \
--device=/dev/input:/dev/input \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--shm-size 1G \
-e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM=1 \
-w "$OPENPILOT_DIR/tools/sim" \
$EXTRA_ARGS \
ghcr.io/commaai/openpilot-sim:latest \
/bin/bash -c "./tmux_script.sh $*"