源码安装Bazel
有時(shí)候我們需要源碼安裝tensorflow,這時(shí)逃不過的第一步就是安裝Bazel,如果沒有root權(quán)限的時(shí)候,這時(shí)我們就需要源碼安裝Bazel了。
cd?into the directory where you unpacked the distribution archive run?bash ./compile.sh
編譯后,最終生成的二進(jìn)制文件bazel在當(dāng)前目錄的?output/bazel下面。
4.? ?更新bashrc
? ?export PATH=$PATH:**/output/bazel?? ? ? ? ? ? ? ?
下面是安裝步驟,參考:https://docs.bazel.build/versions/master/install-compile-source.html
1.?Ensure that JDK 8, Python, Bash, zip, and the usual C++ build toolchain are installed on your system.
這里需要說明的是JDK8的安裝,一般centos默認(rèn)安裝了openJDK,但不完整,因此我們改用oracle的java版本,具體安裝方法,見:《 安裝oracle-java,并覆蓋原先的OpenJDK》
2.?Download and unpack Bazel's distribution archive.
Download?bazel-<version>-dist.zip??from the?release page:https://github.com/bazelbuild/bazel/releases
3.?Build Bazel using?./compile.sh.??? ?
4.? ?更新bashrc
? ?export PATH=$PATH:**/output/bazel?? ? ? ? ? ? ? ?
? 然后source ~/.bashrc即可。
總結(jié)
- 上一篇: 【C语言进阶深度学习记录】三 浮点数(f
- 下一篇: SpringBoot 使用教程