1. Requirements
Ubuntu16.04
CUDA9.0
CUDNN7
2. Refference
3. Install Bazel v0.18.1
4. Install python libraries
pip install pip --upgrade
pip install pip six numpy wheel mock
pip install keras_applications==1.0.5 --no-deps
pip install keras_preprocessing==1.0.3 --no-deps
pip install h5py==2.8.0
5. Build TensorFlow v1.12.1 with CUDA 9.0
git clone https://github.com/tensorflow/tensorflow
cd tensorflow
git checkout v1.12.0
./configure
bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
./bazel-bin/tensorflow/tools/pip_package/build_pip_package ../tensorflow_pkg
chown $HOST_PERMS ./tensorflow_pkg
6. Install tensorflow
pip uninstall tensorflow
pip install ../tensorflow_pkg/tensorflow-1.12.2-cp36-cp36m-linux_x86_64.whl
cd ..
pip freeze | grep tensorflow
7. Result
tensorflow==1.12.2
Thank you.
last-samurai