Building and Installing TensorFlow on CentOS 6.x
In order to build TensorFlow on CentOS there are several alternatives open to you. You could use the Bazel build tool to build TensorFlow from scratch after checking out the code from GitHub or alternatively you could use CMake which is a cross-platform software that uses a compiler-independent method to build code. When using Bazel with Centos 6.x issues tend to arise because of the default gcc compiler version available in the system. Therefore, the CMake route is more easier to follow.
In order to build from CMake which is a small process in itself, you need to install Docker which in turn requires that the CentOS 6.x kernel is updated. In order to do so follow the steps detailed out here.
After you have installed Docker and you have the Docker daemon running on a terminal open up a separate terminal and run the following commands:
git clone --recursive https://github.com/tensorflow/tensorflow.git
cd tensorflow
tensorflow/tools/ci_build/ci_build.sh CMAKE tensorflow/tools/ci_build/builds/cmake.sh
And your done !