TensorFlow - shawfdong/hyades GitHub Wiki

Installing tensorflow on Hyades

The information on this page is accurate as of June 12, 2016, and the steps might be different for later versions of CentOS or tensorflow.

tensorflow is an open source deep learning framework launched and maintained by Google. The following tutorial focuses on how to run tensorflow on the GPU nodes of Hyades.

Before you begin the installation process, load the following modules:

module load python
module load cuda/7.5 

You should now install a local copy of cuDNN. Just follow the instructions and once you're done, add the library to your libray path by running

export LD_LIBRARY_PATH=[PATH TO CUDNN FOLDER]/lib64:$LD_LIBRARY_PATH

Now, let's install tensorflow. Since it easier to these installations via pip, run the command

pip install tensorflow --user

In theory, this command should also install all the necessary dependencies and you now need to go through just one more step. Currently, the version of GLIBC required by tensorflow is not available on the cluster. This is a known issue. However, there is an easy fix to it, documented in this stackoverflow post. We follow the exact same steps. Make sure you are in your home directory and run the following commands

mkdir ~/my_libc_env
cd ~/my_libc_env
wget http://launchpadlibrarian.net/137699828/libc6_2.17-0ubuntu5_amd64.deb
wget http://launchpadlibrarian.net/137699829/libc6-dev_2.17-0ubuntu5_amd64.deb
wget ftp://rpmfind.net/linux/sourceforge/m/ma/magicspecs/apt/3.0/x86_64/RPMS.lib/libstdc++-4.8.2-7mgc30.x86_64.rpm
ar p libc6_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
ar p libc6-dev_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
rpm2cpio libstdc++-4.8.2-7mgc30.x86_64.rpm| cpio -idmv

This will install a local copy of the required version of tensorflow. You can now start python using the following command.

LD_LIBRARY_PATH="$HOME/my_libc_env/lib/x86_64-linux-gnu/:$HOME/my_libc_env/usr/lib64/" $HOME/my_libc_env/lib/x86_64-linux-gnu/ld-2.17.so python

In order to test your installation, try importing tensorflow

import tensorflow

and run the suggested tests.

⚠️ **GitHub.com Fallback** ⚠️