Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

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


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

g2.2xlarge or better


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


git clone
cd neural-style
sh models/

create image

th neural_style.lua -num_iterations 2000 -style_image style.jpg -content_image image.jpg -image_size 400 -backend cudnn
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