#! /bin/bash # To install cudnn-9.2-linux-x64-v7.5.0.56 # Require manual intervention # Refer to https://gist.github.com/lyastro/26e0cd8245bcf64914857dd5e8445724 # Preliminary requirement: # CUDA GPU(s) is (are) present # gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel are present # Mandatory requirement: # cuda-9.2 # For the sake of installation convenience, cudnn from nvidia.com version v7.5.056 (for CUDA version 9.2, linux), cudnn-9.2-linux-x64-v7.5.0.56, has been readily downloaded and stored in the following shared dropbox link which can be wget automatically # https://www.dropbox.com/s/dflepdrzqk78mdv/cudnn-9.2-linux-x64-v7.5.0.56.tgz?dl=0 cd /share/apps/configrepo mkdir cudnn-9.2-linux-x64-v7.5.0.56 cd cudnn-9.2-linux-x64-v7.5.0.56 wget https://www.dropbox.com/s/dflepdrzqk78mdv/cudnn-9.2-linux-x64-v7.5.0.56.tgz?dl=0 -O cudnn-9.2-linux-x64-v7.5.0.56.tgz tar -zxf cudnn-9.2-linux-x64-v7.5.0.56.tgz cd cuda cp include/cudnn.h /usr/local/cuda-9.2/include/ cp lib64/libcudnn* /usr/local/cuda-9.2/lib64/. chmod a+x /usr/local/cuda-9.2/include/cudnn.h /usr/local/cuda-9.2/lib64/libcudnn* pip install --upgrade pip ### pip install cudatoolkit cudnn ### won't work pip install tensorflow-gpu keras numba numpy matplotlib scipy panda pip install ipython # Check Tensorflow with ipython ipython ## In [1]: import tensorflow as tf ## In [2]: sess = tf.Session(config=tf.ConfigProto(log_device_placement=True)) ## check nvidia-smi to see GPU status.