Sometimes we may need to install Tensorflow from source without root access to the server, such as a cluster environment. This is even more true when you need to configure Tensorflow with your own environment: e.g., different Cuda and CuDNN versions. This post describes how to compile Bazel, Swig from source, and use them to compile Tensorflow.
Step 1: Compile Bazel from source
Step 2: Compile Swig from source
Step 3: Compile Tensorflow
Error 1: protoc failed, version `GLIBCXX_3.4.18′ not found (solution)
Error 2: image_ops_gpu.cu buld error
This error occurs when I was trying to compile v1.2.0. Instead, I compiled from the master (commit: 7c10b24de3cb2408441dfd98e1a1a1e8f43f3a7d) and the problem was resolved.
Jun 19, 2017: updated for TF 1.2.0