Skip to content

Instantly share code, notes, and snippets.

@daitomanabe
Last active June 1, 2016 00:57
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daitomanabe/7838c9b704805bfef929ee51ad7cb70c to your computer and use it in GitHub Desktop.
Save daitomanabe/7838c9b704805bfef929ee51ad7cb70c to your computer and use it in GitHub Desktop.
easy set up for neural-stlye with Cuda7.5 + cuDNN5 in EC2

#neural-style with Cuda7.5 + cuDNN5 in EC2

##login

1.set permission

chmod 400 yourkey.pem

2.remote login

ssh -i yourkey.pem ubuntu@xxx-xxx-xxx-xxx-xxx.xxxxxxx.compute.amazonaws.com

torch

cd ~/

curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash

git clone https://github.com/torch/distro.git ~/torch --recursive

cd ~/torch; ./install.sh

source ~/.bashrc

##loadcaffe sudo apt-get install libprotobuf-dev protobuf-compiler

luarocks install loadcaffe

##neuralstyle cd ~/

git clone https://github.com/jcjohnson/neural-style.git

cd neural-style

sh models/download_models.sh (<it will take about 20min)

##cuda backend for torch luarocks install cutorch

luarocks install cunn

##cuDNN v5

download cudnn-7.5-linux-x64-v5.0-ga.tgz

https://developer.nvidia.com/cudnn

####filetransfer (local)

scp -i yourkey.pem /localpath/to/cudnn-7.5-linux-x64-v5.0-ga.tgz ubuntu@xxx-xxx-xxx-xxx-xxx.xxx.compute.amazonaws.com:/home/ubuntu

install

tar -xzvf cudnn-7.5-linux-x64-v5.0-ga.tgz

sudo cp cuda/lib64/libcudnn* /usr/local/cuda-7.5/lib64

sudo cp cuda/include/cudnn.h /usr/local/cuda-7.5/include/

torch binding

luarocks install cudnn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment