Created
July 20, 2014 14:59
-
-
Save r9y9/50f13ba28b5b158c25ae to your computer and use it in GitHub Desktop.
Pylearn2 setup script for Amazon Linux AMI with NVIDIA GRID GPU Driver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Pylearn2 setup script for Amazon Linux AMI with NVIDIA GRID GPU Driver. | |
# http://goo.gl/3KeXXW | |
# not tested | |
sudo yum update -y | |
sudo yum install -y emacs tmux python-pip | |
sudo yum install -y python-devel git blas-devel lapack-devel | |
# numpy, scipy, matplotlib, etc. | |
sudo pip install numpy | |
sudo pip install scipy | |
sudo pip install cython | |
sudo pip install ipython nose | |
# matplotlib | |
sudo yum install -y libpng-devel freetype-devel | |
sudo pip install matplotlib | |
# Scikit-learn | |
sudo pip install scikit-learn | |
# Theano | |
sudo pip install --upgrade git+git://github.com/Theano/Theano.git | |
# Enable GPU for theano | |
echo '[global] | |
floatX = float32 | |
device = gpu0 | |
[nvcc] | |
fastmath = True' > .theanorc | |
# pylearn2 | |
git clone git://github.com/lisa-lab/pylearn2.git | |
cd pylearn2 | |
sudo python setup.py develop | |
cd .. | |
echo "export PYLEARN2_DATA_PATH=/home/ec2-user/data" >> .bashrc | |
# MNIST dataset | |
mkdir -p data/mnist/ | |
cd data/mnist/ | |
wget http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz | |
gunzip train-images-idx3-ubyte.gz | |
wget http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz | |
gunzip train-labels-idx1-ubyte.gz | |
wget http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz | |
gunzip t10k-images-idx3-ubyte.gz | |
wget http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz | |
gunzip t10k-labels-idx1-ubyte.gz | |
cd ../.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment