Skip to content

Instantly share code, notes, and snippets.

@stevetjoa
Last active August 28, 2016 05:49
Show Gist options
  • Save stevetjoa/47b142c6d5d9e88204eb to your computer and use it in GitHub Desktop.
Save stevetjoa/47b142c6d5d9e88204eb to your computer and use it in GitHub Desktop.
Setup: Amazon AWS EC2 with NVIDIA CUDA GPU and Theano

Setup: Amazon AWS EC2 with NVIDIA CUDA GPU and Theano

2015 Sep 22: nvidia-352 seems to have disappeared from the repos.

  1. Spot request Ubuntu Server 14.04; add storage; login with ssh

  2. sudo apt-get update

  3. sudo apt-get upgrade

  4. sudo apt-get dist-upgrade

  5. sudo apt-get install git gcc g++ gfortran build-essential python-dev python-pip python-matplotlib python-scipy libhdf5-dev linux-image-extra-virtual

  6. sudo pip install --upgrade pip

  7. sudo reboot

  8. sudo pip install theano ipython jupyter

  9. install from the deb file as described here

  10. load env variables in .bashrc:

    export PATH=/usr/local/cuda/bin:$PATH export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

  11. create ~/.theanorc

    [global]
    device=gpu
    floatX=float32
    optimizer_including=cudnn
    
  12. Download cudnn.

  13. scp cudnn-7.0-linux-x64-v3.0-prod.tgz violinio-nn:/home/ubuntu/

  14. tar -xzvf cudnn-7.0-linux-x64-v3.0-prod.tgz

  15. Copy cudnn files into /usr/local/cuda/include and lib64.

  16. sudo reboot

  17. Run this test.

Jupyter

  1. jupyter notebook --generate-config
  2. change ip address; open_browser = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment