-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker_run.sh
executable file
·35 lines (27 loc) · 911 Bytes
/
docker_run.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
34
35
#!/bin/bash
#
# Usage: ./docker_run.sh
#
container_name="yolo-docker"
do_smallrun() {
./monitor.sh docker $1 &
sudo docker exec $container_name /bin/bash -c "cd /yolo_script; ./smallrun.sh docker $1"
#echo "Stop container..."
sudo docker stop $container_name >/dev/null 2>&1
}
mkdir cpu_results 2>/dev/null
rm cpu_results/docker* 2>/dev/null
INF_RESULT_PATH=/yolo_script/inference_results
sudo docker start $container_name >/dev/null 2>&1
sudo docker exec $container_name /bin/bash -c "mkdir $INF_RESULT_PATH >/dev/null 2>&1; rm -rf $INF_RESULT_PATH/* >/dev/null 2>&1"
sudo docker stop $container_name >/dev/null 2>&1
sleep 10
tasks=("classify" "detect" "pose" "segment" "obb")
for task in "${tasks[@]}"; do
#echo "Start container..."
sudo docker start $container_name >/dev/null 2>&1
echo "Start [[${task}]]"
do_smallrun ${task}
sleep 10
done
echo "All tasks finished successfully!!"