TensorFlow编译安装(Linux)

一、TensorFlow依赖项:
1.bazel-0.15.2(bazel-0.15.2-installer-linux-x86_64.sh)
下载:https://github.com/bazelbuild/bazel/releases?after=0.19.1
安装:

$ sudo ./bazel-0.15.2-installer-linux-x86_64.sh

2.protobuf-3.6.1(protobuf-all-3.6.1.tar.gz):
安装:

二、TensorFlow编译(版本:1.12)
1.Github:https://github.com/tosonw/tensorflow

$ git clone -b r1.12 https://github.com/tosonw/tensorflow.git

2.配置:

$ sudo ./configure

3.编译:

$ bazel build --config=opt --config=cuda --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow:libtensorflow_cc.so

注:RTX2060 的 Compute Capability 为 7.5(但是tensorflow_1.12不支持该架构:compute_75,tensorflow_2.0也许支持,但需要bazel_1.22,未继续研究)

猜你喜欢

转载自blog.csdn.net/Tosonw/article/details/89884948