forked from luxonis/depthai-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_dependencies.sh
More file actions
executable file
·73 lines (66 loc) · 1.51 KB
/
docker_dependencies.sh
File metadata and controls
executable file
·73 lines (66 loc) · 1.51 KB
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
#!/bin/bash
set -e
readonly linux_pkgs=(
cmake
git
python3-numpy
)
readonly ubuntu_pkgs=(
${linux_pkgs[@]}
# https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html
build-essential
libgtk2.0-dev
pkg-config
libavcodec-dev
libavformat-dev
libswscale-dev
libtbb2
libtbb-dev
libjpeg-dev
libpng-dev
libtiff-dev
libdc1394-22-dev
# https://stackoverflow.com/questions/55313610
ffmpeg
libsm6
libxext6
libgl1-mesa-glx
)
readonly ubuntu_arm_pkgs=(
"${ubuntu_pkgs[@]}"
# https://stackoverflow.com/a/53402396/5494277
libhdf5-dev
libhdf5-dev
libatlas-base-dev
libqtgui4
libqt4-test
# https://github.com/EdjeElectronics/TensorFlow-Object-Detection-on-the-Raspberry-Pi/issues/18#issuecomment-433953426
libilmbase-dev
libopenexr-dev
libgstreamer1.0-dev
)
print_action () {
green="\e[0;32m"
reset="\e[0;0m"
printf "\n$green >>$reset $*\n"
}
print_and_exec () {
print_action $*
$*
}
if [ -f /etc/os-release ]; then
# shellcheck source=/etc/os-release
source /etc/os-release
if [[ ! $(uname -m) =~ ^arm* ]]; then
apt-get update
apt-get install -y "${ubuntu_pkgs[@]}"
python3 -m pip install --upgrade pip
elif [[ $(uname -m) =~ ^arm* ]]; then
apt-get update
apt-get install -y "${ubuntu_arm_pkgs[@]}"
python3 -m pip install --upgrade pip
fi
else
echo "ERROR: Host not supported"
exit 99
fi