INSTALL.sh 1.51 KB
Newer Older
Gabriel Kirsten's avatar
Gabriel Kirsten committed
1 2
#!/bin/bash

Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
3 4 5 6 7
RED='\033[0;31m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NC='\033[0m'

Gabriel Kirsten's avatar
Gabriel Kirsten committed
8
echo "[PYNOVISAO INSTALLER] Installing PYNOVISAO... Please wait!"
Gabriel Kirsten's avatar
Gabriel Kirsten committed
9 10 11

#check if is root
if [ "$EUID" -ne 0 ]
Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
12 13
  then printf "${RED}[PYNOVISAO INSTALLER] ERROR! Please run as root.${NC}"
  echo
Gabriel Kirsten's avatar
Gabriel Kirsten committed
14 15 16
  exit
fi

Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
17 18 19
echo "[PYNOVISAO INSTALLER] Updating apt-get..."
sudo apt-get -qq update
echo "[PYNOVISAO INSTALLER] Installing prerequisites..."
20 21
sudo apt-get -qq -y install libfreetype6-dev tk tk-dev python-pip default-jre default-jdk weka weka-doc python-tk python-matplotlib python-opencv

Gabriel Kirsten's avatar
Gabriel Kirsten committed
22

Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
23 24
echo "[PYNOVISAO INSTALLER] Upgrading pip..."
pip install --upgrade pip  --quiet
25
# Numpy must be installed before installing javabridge
Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
echo "[PYNOVISAO INSTALLER] Installing numpy..."
pip install numpy --quiet
echo "[PYNOVISAO INSTALLER] Installing libraries..."
pip install -r requeriments.txt --quiet

printf "${YELLOW} \n======== WARNING ========\n"
printf "The Keras is necessary so that it is possible to use CNN. It is recommended to install the version for GPU processing (if available) but it is also possible to use CPU processing.\n"
printf "To install the GPU version (tricky) follow the steps at: https://www.tensorflow.org/install/install_linux"
printf "${NC}\n"
read -p "Would you like to install keras CPU libraries? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
   echo "[PYNOVISAO INSTALLER] Installing keras libraries..."
   sudo pip install tensorflow 
   sudo pip install keras
fi
Gabriel Kirsten's avatar
Gabriel Kirsten committed
43

Gabriel Kirsten's avatar
Gabriel Kirsten committed
44
echo
Gabriel Kirsten's avatar
 
Gabriel Kirsten committed
45
printf "${BLUE}[PYNOVISAO INSTALLER] Installation completed!${NC}"
Gabriel Kirsten's avatar
Gabriel Kirsten committed
46
echo