Skip to content

Instantly share code, notes, and snippets.

@genekogan
Last active October 3, 2019 23:59
Show Gist options
  • Save genekogan/5569833564ab21460b2af25357771796 to your computer and use it in GitHub Desktop.
Save genekogan/5569833564ab21460b2af25357771796 to your computer and use it in GitHub Desktop.
fix luarocks and install neural-style on a fresh paperspace ML-in-a-box template
# repair luarocks
sudo rm -rf ~/.cache/luarocks/
luarocks install loadcaffe
luarocks install cutorch
luarocks install cudnn
luarocks install cunn
# get cudnn (https://developer.nvidia.com/cudnn) and then (assuming cudnn 7.*) ...
git clone https://github.com/soumith/cudnn.torch.git -b R7 && cd cudnn.torch && luarocks make cudnn-scm-1.rockspec && cd .. && rm -rf cudnn.torch
# get neural-style
git clone https://github.com/jcjohnson/neural-style
cd neural-style
sh models/download_models.sh
@granthoff1107
Copy link

granthoff1107 commented Aug 3, 2019

Do you have an update for unbuntu 18, I've been following along with the http://ml4a.github.io/classes/itp-F18/terminal-velocity/# demo, but there are a few descrepancies.

Looks like torch isn't installed, and doesn't properly work with cuda 10, which comes as the default cuda for the ubuntu 18.04
The issue is addressed here:
torch/cutorch#834,
There is a torch distro in there which can be used or you can follow the instructions

Luarocks also seems to be missing some of the rocks there is a resolution in this issue here:
torch/nngraph#52
sudo apt-get install libprotobuf-dev protobuf-compiler
e.g luarocks --from=https://raw.githubusercontent.com/torch/rocks/master/ install loadcaffe

@genekogan
Copy link
Author

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