2024-08-27 08:25:15 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2021-06-10 09:36:07 +08:00
|
|
|
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
|
|
|
OP_ROOT="$DIR/../../"
|
2022-11-04 08:24:28 +08:00
|
|
|
PANDA_ROOT="$DIR/../"
|
2021-06-10 09:36:07 +08:00
|
|
|
|
|
|
|
if [ -z "$BUILD" ]; then
|
|
|
|
docker pull docker.io/commaai/panda:latest
|
|
|
|
else
|
2022-11-04 08:24:28 +08:00
|
|
|
docker build --cache-from docker.io/commaai/panda:latest -t docker.io/commaai/panda:latest -f $PANDA_ROOT/Dockerfile $PANDA_ROOT
|
2021-06-10 09:36:07 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker run \
|
|
|
|
-it \
|
|
|
|
--rm \
|
|
|
|
--volume $OP_ROOT:$OP_ROOT \
|
|
|
|
--workdir $PWD \
|
|
|
|
--env PYTHONPATH=$OP_ROOT \
|
|
|
|
docker.io/commaai/panda:latest \
|
|
|
|
/bin/bash
|