Skip to content

Instantly share code, notes, and snippets.

@dniku
Last active August 29, 2015 14:15
Show Gist options
  • Save dniku/9a68529d7f3760412971 to your computer and use it in GitHub Desktop.
Save dniku/9a68529d7f3760412971 to your computer and use it in GitHub Desktop.
To launch, do "chmod +x setup_pylearn2_aws.sh" first. An updated version of http://www.kurtsp.com/deep-learning-in-python-with-pylearn2-and-amazon-ec2.html
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install git make python-dev python-setuptools libblas-dev gfortran g++ python-pip python-numpy python-scipy liblapack-dev
sudo pip install ipython nose
sudo apt-get install screen
sudo pip install --upgrade git+git://github.com/Theano/Theano.git
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
sudo apt-get update
sudo apt-get -y install cuda
#THEANO_FLAGS=floatX=float32,device=gpu0 python /usr/local/lib/python2.7/dist-packages/theano/misc/check_blas.py
git clone git://github.com/lisa-lab/pylearn2.git
cd pylearn2
sudo python setup.py develop
cd ..
echo "export PATH=/usr/local/cuda-6.5/bin:$PATH" >> .bashrc
echo "export LD_LIBRARY_PATH=/usr/local/cuda-6.5/lib64:$LD_LIBRARY_PATH" >> .bashrc
echo "export PYLEARN2_DATA_PATH=/home/ubuntu/data" >> .bashrc
source .bashrc
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 ../..
echo '[global]
floatX = float32
device = gpu0
[nvcc]
fastmath = True' > .theanorc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment