我正在尝试使用带bazel-buildfarm的远程execution+caching从源代码构建TensorFlow。我已经使用示例配置文件@ https://github.com/bazelbuild/bazel-buildfarm (参见examples/目录)设置了一个bazel-buildfarm服务器和worker。
我在TensorFlow的源代码库内的.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。
发布于 2020-02-27 04:22:14
删除--spawn_strategy和--genrule_strategy标志。操作将在可用时使用远程执行,否则将后退到本地或沙箱选项。听起来genrule需要在本地运行,但是您的标志阻止了它这样做。
https://stackoverflow.com/questions/60419561
复制相似问题