Skip to content

Instantly share code, notes, and snippets.

@n1ckfg
Last active September 24, 2018 02:35
Show Gist options
  • Save n1ckfg/b7b3edd820f3e0060310322cf3e71d5f to your computer and use it in GitHub Desktop.
Save n1ckfg/b7b3edd820f3e0060310322cf3e71d5f to your computer and use it in GitHub Desktop.
Artistic-Videos Setup

SETUP for ARTISTIC-VIDEOS on Ubuntu 16.04 / 180923 https://github.com/manuelruder/artistic-videos

  1. Sign up for an Nvidia developer account to get CUDA and CuDNN. You probably want CUDA 8 and CuDNN 5.

  2. Install CUDA. DO NOT update Nvidia graphics driver when asked! (It'll break Ubuntu.) DO use a symlink for the location when asked--that lets you have multiple CUDA/CuDNN installations on your machine.

  3. If you accidentally updated the graphics driver, you'll appear to be locked out of Ubuntu. Don't panic; it just can't launch the GUI past your login screen. Boot to terminal and remove all your Nvidia drivers with:

sudo apt-get purge nvidia*
  1. Update Ubuntu's Nvidia graphics driver properly following these instructions: http://askubuntu.com/questions/451221/ubuntu-14-04-install-nvidia-driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo ubuntu-drivers autoinstall
sudo reboot
  1. Reboot and confirm that the Nvidia driver install is OK.

  2. Follow these instructions to finish up your CUDA install: http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.5-ubuntu

  3. Install CuDNN following these directions: https://groups.google.com/forum/#!msg/caffe-users/nlnMFI0Mh7M/8Y4z1VCcBr4J https://www.cs.cmu.edu/~ymiao/pdnntk/cuDNN.html

sudo cp lib64/lib* /usr/local/cuda/lib64/
sudo cp include/cudnn.h /usr/local/cuda/include/
  1. Add these lines to your local .bashrc file:
export CPATH=/usr/local/cuda/lib64:$CPATH
export LIBRARY_PATH=/usr/local/cuda/lib64:$LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH	
  1. Install ffmpeg: http://www.faqforge.com/linux/how-to-install-ffmpeg-on-ubuntu-14-04/ ffmpeg is required, but since you'll be working with videos, you might also find it helpful to install the VLC video player and the OpenShot video editor.
sudo apt-get install ffmpeg
  1. Install Torch: http://torch.ch/docs/getting-started.html
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
bash install-deps
./install.sh
source ~/.bashrc
  1. Install Torch packages using the luarocks package manager: https://raw.githubusercontent.com/szagoruyko/loadcaffe/master/README.md https://github.com/e-lab/torch-toolbox/blob/master/Tutorials/Install-CUDNN-on-Jetson-TK1.md
luarocks install cudnn    
luarocks install cunn
luarocks install loadcaffe
  1. Download DeepFlow and DeepMatching; add just the executables to the project directory.

  2. Run the model download script in Artistic-Videos to get the model.

  3. ...and go!

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