Skip to content

Instantly share code, notes, and snippets.

@Raghuramgrr
Created April 18, 2018 09:15
Show Gist options
  • Save Raghuramgrr/f1d828880724a0f5167d4f7aa6471519 to your computer and use it in GitHub Desktop.
Save Raghuramgrr/f1d828880724a0f5167d4f7aa6471519 to your computer and use it in GitHub Desktop.
DeepLearning_Dependencies Install
#!/bin/bash
orig_executor="$(whoami)"
if [ "$(whoami)" == "root" ]; then
echo "running as root, please run as user you want to have stuff installed as"
exit 1
fi
###################################
# Ubuntu 16.04 Install script for:
# Pythonlibs
# Numpy
# scikit
# matplotlib
# - Keras
###################################
export DEBIAN_FRONTEND=noninteractive
sudo apt-get install -y libncurses-dev
pip uninstall pillow
git clone https://github.com/python-pillow/Pillow.git
cd Pillow
python setup.py install
# Python basics: update pip and setup a virtualenv to avoid mixing packages
# installed from source with system packages
sudo apt-get update -y
sudo apt-get install -y python-dev python-pip htop
sudo pip install -U pip virtualenv
if [ ! -d "venv" ]; then
virtualenv venv
echo "source ~/venv/bin/activate" >> ~/.bashrc
fi
source venv/bin/activate
pip install -U pip
pip install -U circus circus-web Cython Pillow
# Checkout this project to access installation script and additional resources
if [ ! -d "dl-machine" ]; then
git clone [email protected]:deeplearningparis/dl-machine.git
(cd dl-machine && git remote add http https://github.com/deeplearningparis/dl-machine.git)
else
if [ "$1" == "reset" ]; then
(cd dl-machine && git reset --hard && git checkout master && git pull --rebase $REMOTE master)
fi
fi
# Build numpy from source against OpenBLAS
# You might need to install liblapack-dev package as well
# sudo apt-get install -y liblapack-dev
rm -f ~/.numpy-site.cfg
ln -s dl-machine/numpy-site.cfg ~/.numpy-site.cfg
pip install -U numpy
# Build scipy from source against OpenBLAS
rm -f ~/.scipy-site.cfg
ln -s dl-machine/scipy-site.cfg ~/.scipy-site.cfg
pip install -U scipy
# Install common tools from the scipy stack
sudo apt-get install -y libfreetype6-dev libpng12-dev
pip install -U matplotlib ipython[all] pandas scikit-image
# Scikit-learn (generic machine learning utilities)
pip install -e git+git://github.com/scikit-learn/scikit-learn.git#egg=scikit-learn
####################################
# Keras
# https://github.com/fchollet/keras
# http://keras.io/
####################################
git clone https://github.com/fchollet/keras.git
cd keras
python setup.py install
echo "Keras installed"
echo "all done, please restart your machine..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment