Building TensorFlow with bazel-buildfarm



我正在尝试使用远程执行+bazel buildfarm缓存从源代码构建TensorFlow。我已经使用示例配置文件设置了一个bazel buildfarm服务器和worker。@https://github.com/bazelbuild/bazel-buildfarm(请参见examples/目录(。

我在TensorFlow(master负责人(的源repo中向.bazelrc添加了以下规则:

build --spawn_strategy=remote
build --genrule_strategy=remote
build --strategy=Javac=remote 
build --strategy=Closure=remote
build --remote_executor=grpc://<bazel-buildfarm-server>:8980

然后,我使用一些选项运行./configure,我知道这些选项对于本地、非远程构建是成功的。

我开始构建TensorFlow:

bazel build —config=opt —config=cuda --config=v2 //tensorflow/tools/pip_package:build_pip_package

此后不久,我收到了以下错误消息:

...
ERROR: /tensorflow/tensorflow/core/util/BUILD:345:1: Executing genrule //tensorflow/core/util:version_info_gen failed: No usable spawn strategy found for spawn with mnemonic Genrule.  Your --spawn_strategy, --genrule_strategy or --strategy flags are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for migration advice
Target //tensorflow/tools/pip_package:build_pip_package failed to build

有人能帮我解读这条信息吗?我想弄清楚发生了什么,以及如何使用bazel buildfarm来构建TensorFlow。

删除--spawn_strategy--genrule_strategy标志。只要可用,操作将使用远程执行,否则将回退到本地或沙盒选项。听起来genrule需要在本地运行,但您的标志阻止了它这样做

最新更新