【问题标题】:bazel building tensorflow serving errorbazel构建张量流服务错误
【发布时间】:2018-04-16 09:55:01
【问题描述】:

我正在运行一个 tensorflow 服务容器,指的是这个,前面的所有步骤都很好,但是在最后一个块中我遇到了一些问题:

 git clone --recurse-submodules https://github.com/tensorflow/serving
 cd serving/
 bazel build -c opt tensorflow_serving/...




 root@15bb1c2766e3:/serving# bazel build -c opt tensorflow_serving/...

错误:

/root/.cache/bazel/_bazel_root/f8d1071c69ea316497c31e40fe01608c/external/org_tensorflow/third_party/clang_toolchain/cc_configure_clang.bzl:3:1: 文件“@bazel_tools//tools/cpp:cc_configure.bzl”不包含 符号“cc_autoconf_impl”。错误:错误加载包'':扩展 文件“third_party/clang_toolchain/cc_configure_clang.bzl”有错误。 错误:错误加载包'':扩展文件 “third_party/clang_toolchain/cc_configure_clang.bzl”有错误。信息: 经过时间:0.107 秒错误:无法开始构建。无法运行 测试。而在我的容器中,bazel 版本是 0.9.0:

【问题讨论】:

    标签: bazel tensorflow-serving


    【解决方案1】:

    我刚刚遇到了这个错误。首先请通过输入命令bazel version检查您的Bazel版本是否为0.5.4。

    如果 bazel 版本是 0.5.4 你需要升级到 0.12.0 。要进行更新,您可以将 Dockerfile.devel BAZEL_VERSION 更改为 0.12.0 并重新运行所有步骤。

    或者您可以通过

    直接在 docker 容器中更新 bazel
    1. 从以下位置下载 bazel--installer-linux-x86_64.sh https://github.com/bazelbuild/bazel/releases位置
    2. chmod +x ./bazel--installer-linux-x86_64.sh
    3. ./bazel--installer-linux-x86_64.sh

    我已经在 github 上回答了这个问题,并且成功了。请参考链接https://github.com/tensorflow/serving/issues/851https://github.com/tensorflow/serving/issues/854

    【讨论】:

    • 工作谢谢。由于某种原因,下载脚本并运行它对我不起作用,但在重建后将 docker 文件中的 bazel 版本设置为 0.12.0 有效。干杯!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-18
    • 1970-01-01
    • 1970-01-01
    • 2018-06-21
    • 2018-09-26
    相关资源
    最近更新 更多