#neural-style with Cuda7.5 + cuDNN5 in EC2
-
if you want to skip installing nvidia driver and cuda7.5, use this Ubuntu 14 AMI.
https://aws.amazon.com/marketplace/pp/B01EYKBEQ0
(Nvidia Drivers, Cuda 7.5 Toolkit, cuDNN pre-installed with Nvidia Drivers, Cuda 7.5 Toolkit, cuDNN 4, TensorFlow, and Jupyter to leverage Nvidia GRID instances)
g2.2xlarge or better (GPU instance)
Don't forget to make your root partition size bigger. -
In case you want to install everything by yourself (I will write details when I have time..)
https://github.com/BVLC/caffe/wiki/Caffe-on-EC2-Ubuntu-14.04-Cuda-7 http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
##login
1.set permission
chmod 400 yourkey.pem
2.remote login
ssh -i yourkey.pem [email protected]
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
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/
luarocks install cudnn