How to install tensorflow from source on ubuntu 18.04 64bit

1,install dependencies

sudo apt-get install openjdk-8-jdk git python-dev python3-dev python-numpy python3-numpy build-essential python-pip python3-pip python-virtualenv swig python-wheel libcurl3-dev curl unzip bash-completion
2.get bazel
wget https://github.com/bazelbuild/bazel/releases/download/0.21.0/bazel_0.21.0-linux-x86_64.deb
2.install bazel
sudo dpkg -i bazel_0.21.0-linux-x86_64.deb
3.get tensorflow
git clone   https://github.com/tensorflow/tensorflow.git
cd tensorflow
4.config tensorflow
./configure
My configuration as below:
Please specify the location of python. [Default is /usr/bin/python]:
Found possible Python library paths:
  /usr/local/lib/python2.7/dist-packages
  /usr/lib/python2.7/dist-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/dist-packages]  (note:use python2.7)

Do you wish to build TensorFlow with XLA JIT support? [Y/n]: n
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: n
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]: n
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: n
No CUDA support will be enabled for TensorFlow.

Do you wish to download a fresh release of clang? (Experimental) [y/N]: n
Clang will not be downloaded.

Do you wish to build TensorFlow with MPI support? [y/N]: n
No MPI support will be enabled for TensorFlow.
5.compile tensorflow
bazel build -c opt --local_resources 2048,.5,1.0 --verbose_failures  tensorflow/tools/pip_package:build_pip_package
6.create tensorflow package

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

7.install tensorflow package
sudo pip2 install /tmp/tensorflow_pkg/tensorflow-1.0.0-cp27-cp27m-linux_x86_64.whl