-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstartup.sh
executable file
·34 lines (28 loc) · 1.29 KB
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
device="$1"
rebuild="$2"
if [[ "$(docker images -q docker-swiftly:latest 2> /dev/null)" == "" ]]; then
# build
echo "docker-swiftly:latest not found. Going to build the image. This will take time..... Grab a Coffee !!!!"
docker build -f docker/Dockerfile -t docker-swiftly:latest .
else
echo "docker-swiftly:latest found"
fi
if [[ "$rebuild" == "rebuild" ]]; then
echo "Going to rebuild the the image. This will take time..... Grab a Coffee !!!!"
docker build -f docker/Dockerfile -t docker-swiftly:latest .
fi
# Build The Code
docker run -it --rm --gpus all -v ${PWD}:/workspace/swiftly/ --net=host --ipc=host \
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device ${device} \
-w /workspace/swiftly/build docker-swiftly:latest \
cmake ..
docker run -it --rm --gpus all -v ${PWD}:/workspace/swiftly/ --net=host --ipc=host \
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device ${device} \
-w /workspace/swiftly/build docker-swiftly:latest \
make -j$(nproc)
xhost +
docker run -it --rm --gpus all -v ${PWD}:/workspace/swiftly/ --net=host --ipc=host \
-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device ${device} \
-w /workspace/swiftly/build docker-swiftly:latest \
./adas_fusion ../assets/models/yolov8s.engine ${device}