Install bazel
Install java jdk
Required Java version:
- Java JDK 8 or later (JDK 7 is still supported but deprecated).
In centos we can simply install this by command:
set JAVA_HOME
environment variables in .bashrc
:
|
|
Download bazel source code
Download from github and compile:
|
|
Set bazel to PATH
ADD bazel-bin/src/bazel
to .bashrc
In my server as:
|
|
Now, we have install the bazel in centos.
If you use Ubuntu OS, you can install it form apt repository. In this blog, I will not tell the detailed, which you can reference the link:
|
|
Install Tensorflow
Download source code
Clone the tensorflow from github:
|
|
Configure for installation
|
|
Then, it will tell you which environment to set. such as:
|
|
Create the pip package and install
When building from source, you will still build a pip package and install that.
|
|
Setting up TensorFlow for Development
If you’re working on TensorFlow itself, it is useful to be able to test your changes in an interactive python shell without having to reinstall TensorFlow.
To set up TensorFlow such that all files are linked (instead of copied) from the system directories, run the following commands inside the TensorFlow root directory:
|
|
Such as change the version from 0.10.0 to 0.11.0 filetensorflow/tools/pip_package/setup.py
:
|
|
Then, do the following:
Now, we can build our develop tensorflow:
|
|
Verify the installation
|
|
We can find the version changed from the 0.10.0tc0
to 0.11.0rc0
.
Reference
official link:this.