Skip to content

Instantly share code, notes, and snippets.

@shunfunaki
Last active November 10, 2017 09:25
Show Gist options
  • Save shunfunaki/8d0422bd3b972c071f6c to your computer and use it in GitHub Desktop.
Save shunfunaki/8d0422bd3b972c071f6c to your computer and use it in GitHub Desktop.

How to Install & Running "Neural Style (A Neural Algorithm of Artistic Style )" on your EC2 Instance

Links

EC2 GPU/CUDA INSTANCE (AMI:ami-ffba7b94)

g2.2xlarge or better

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-ffba7b94

Login

ssh -i yourpemkey.pem ubuntu@ec2-public-dns-name

Update System Packages

sudo apt-get update
sudo apt-get upgrade

we must use CUDNN R2

cd cudnn-6.5-linux-x64-R2-rc1
sudo cp lib* /usr/local/cuda/lib64/
sudo cp cudnn.h /usr/local/cuda/include/

install Deep Learning modules

luarocks install image
luarocks install loadcaffe
luarocks install torch

neural-style

git clone https://github.com/jcjohnson/neural-style
cd neural-style
sh models/download_models.sh

create image

th neural_style.lua -num_iterations 2000 -style_image style.jpg -content_image image.jpg -image_size 400 -backend cudnn
@persac
Copy link

persac commented Oct 22, 2017

The correct CUDNN directory seems to be
cd cudnn-6.5-linux-x64-v2-rc2

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