Commit 19e3c6da authored by Gabriel Kirsten's avatar Gabriel Kirsten
Browse files

Added installer to cnn
parent 600fde02
#!/bin/bash
RED='\033[0;31m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NC='\033[0m'
echo "[PYNOVISAO INSTALLER] Installing PYNOVISAO... Please wait!"
#check if is root
if [ "$EUID" -ne 0 ]
then echo "[PYNOVISAO INSTALLER] ERROR! Please run as root."
then printf "${RED}[PYNOVISAO INSTALLER] ERROR! Please run as root.${NC}"
echo
exit
fi
sudo apt-get update
sudo apt-get -y install libfreetype6-dev tk tk-dev python-pip default-jre default-jdk weka weka-doc python-tk
echo "[PYNOVISAO INSTALLER] Updating apt-get..."
sudo apt-get -qq update
echo "[PYNOVISAO INSTALLER] Installing prerequisites..."
sudo apt-get -qq -y install libfreetype6-dev tk tk-dev python-pip default-jre default-jdk weka weka-doc python-tk
echo "[PYNOVISAO INSTALLER] Installing libraries..."
pip install --upgrade pip
echo "[PYNOVISAO INSTALLER] Upgrading pip..."
pip install --upgrade pip --quiet
# Numpy must be installed before installing javabridge
pip install numpy
pip install -r requeriments.txt
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
echo
echo "[PYNOVISAO INSTALLER] Installation completed!"
printf "${BLUE}[PYNOVISAO INSTALLER] Installation completed!${NC}"
echo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment