-
Notifications
You must be signed in to change notification settings - Fork 1
GPU instructions
To run on GPU:
Must have gnu set to gpu:0 in params.py and hourglass_tiny.py
Must have in hourglass_tiny.py:
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
Then:
$ source activate tensorflow
$ python train_launcher.py
To run from laptop at home
$ ssh <username>@hex.otago.ac.nz
$ ssh <username>@deepest
To check processes:
nvidia-smi
To kill:
Kill -9 <PID>
To copy generated data over to GPU:
scp -r hannah@OUCS1379:~/…./data new_data
To set up to work on GPU:
(Download and install Anaconda)
$ cd /tmp
$ curl -O https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh
$ sha256sum Anaconda3-5.0.1-Linux-x86_64.sh
$ bash Anaconda3-5.0.1-Linux-x86_64.sh
yes yes
$ source ~/.bashrc
(Create conda env and install the GPU version of tensorflow)
$ conda create -n tensorflow pip python=3
$ source activate tensorflow
$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu- 1.8.0-cp36-cp36m-linux_x86_64.whl
(Set it to the right version of CUDA and CUDNN)
$ export CUDA_HOME=/usr/local/cuda-9.0_cudnn7.0
$ export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
$ conda install