-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_pi_requirements.sh
33 lines (23 loc) · 1.21 KB
/
get_pi_requirements.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
#!/bin/bash
# Get packages required for OpenCV
sudo apt-get -y install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get -y install libxvidcore-dev libx264-dev
sudo apt-get -y install qt4-dev-tools libatlas-base-dev
pip3 install opencv-python==3.4.6.27
# Get packages required for TensorFlow
# For now, downloading the TensorFlow builds from lhelontra's "TensorFlow on ARM" repository
# Thanks lhelontra for being super awesome!
# Will change to just 'pip3 install tensorflow' once newer versions of TF are added to piwheels
#pip3 install tensorflow
version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
if [ $version == "3.7" ]; then
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.0.0/tensorflow-2.0.0-cp37-none-linux_armv7l.whl
pip3 install tensorflow-2.0.0-cp37-none-linux_armv7l.whl
rm tensorflow-2.0.0-cp37-none-linux_armv7l.whl
fi
if [ $version == "3.5" ]; then
wget https://dl.google.com/coral/python/tflite_runtime-1.14.0-cp35-cp35m-linux_armv7l.whl
pip3 install tflite_runtime-1.14.0-cp35-cp35m-linux_armv7l.whl
rm tflite_runtime-1.14.0-cp35-cp35m-linux_armv7l.whl
fi