-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.sh
More file actions
34 lines (28 loc) · 1.04 KB
/
install.sh
File metadata and controls
34 lines (28 loc) · 1.04 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
#!/bin/bash
LOG="./install.log"
install_system_dependencies() {
sudo apt-get update
# python 2.7
sudo apt-get install -y python-dev python-pip
}
install_python_dependencies() {
sudo -H pip install pyyaml paho-mqtt
}
install_tensorflow() {
TENSORFLOW_VERSION="1.0.1"
TENSORFLOW_PKG_ARM="https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-cp27-none-linux_armv7l.whl"
TENSORFLOW_PKG_X86="https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-${TENSORFLOW_VERSION}-cp27-none-linux_x86_64.whl"
ARCH=`uname -m`
if [[ $ARCH == arm* ]]; then
sudo -H pip install --upgrade $TENSORFLOW_PKG_ARM
elif [[ $ARCH == x86* ]]; then
sudo -H pip install --upgrade $TENSORFLOW_PKG_X86
else
echo "Unknown architecture $ARCH. Please install tensorflow manually."
exit 1
fi
}
install_system_dependencies 2>&1 | tee -a $LOG
install_python_dependencies 2>&1 | tee -a $LOG
install_tensorflow 2>&1 | tee -a $LOG
echo "Installation is completed." | tee -a $LOG