Newer
Older
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
print_help () {
echo "Starts specified services in separate docker containers. If no option specified, starts all services including kafka"
echo ""
echo "options:"
echo "-h, --help show help"
echo "--detection start detection service"
echo "--tracking start tracking service"
echo "--pose3d start 3d pose estimation service"
echo "--distance start distance estimation service"
echo "--actions start actions classification service"
echo "--kafka start kafka on 9092 port without SSL authentication"
}
devbeh_all=true
devbeh_detection=false
devbeh_tracking=false
devbeh_pose3d=false
devbeh_distance=false
devbeh_actions=false
devbeh_kafka=false
while test $# -gt 0; do
case "$1" in
-h|--help)
print_help
exit 0
;;
--detection)
devbeh_all=false
devbeh_detection=true
shift
;;
--tracking)
devbeh_all=false
devbeh_tracking=true
shift
;;
--pose3d)
devbeh_all=false
devbeh_pose3d=true
shift
;;
--distance)
devbeh_all=false
devbeh_distance=true
shift
;;
--actions)
devbeh_all=false
devbeh_actions=true
shift
;;
--kafka)
devbeh_all=false
devbeh_kafka=true
shift
;;
*)
shift
;;
esac
done
devbeh_services=""
if [ "$devbeh_all" = true ] || [ "$devbeh_kafka" = true ]; then
devbeh_services="$devbeh_services kafka"
fi
if [ "$devbeh_all" = true ] || [ "$devbeh_detection" = true ]; then
devbeh_services="$devbeh_services detection"
fi
if [ "$devbeh_all" = true ] || [ "$devbeh_tracking" = true ]; then
devbeh_services="$devbeh_services tracking"
fi
if [ "$devbeh_all" = true ] || [ "$devbeh_pose3d" = true ]; then
devbeh_services="$devbeh_services pose3d"
fi
if [ "$devbeh_all" = true ] || [ "$devbeh_distance" = true ]; then
devbeh_services="$devbeh_services distance"
fi
if [ "$devbeh_all" = true ] || [ "$devbeh_actions" = true ]; then
devbeh_services="$devbeh_services actions"
fi
current_dir=$(pwd)
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
# shellcheck disable=SC2086
docker-compose up -d $devbeh_services --force-recreate --build