Skip to content

Instantly share code, notes, and snippets.

@daitomanabe
Last active June 1, 2016 00:57
Show Gist options
  • 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 [email protected]

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 [email protected]:/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