分布式tensorflow失败,"在包上找不到BUILD文件"

jav*_*dba 4 tensorflow

尝试使用以下内容构建core/distributed_runtime模块时:

$ bazel build -c opt 
   //tensorflow/core/distributed_runtime/rpc:grpc_tensorflow_server
Run Code Online (Sandbox Code Playgroud)

我们收到以下错误:

ERROR: error loading package 'tensorflow/core/distributed_runtime/rpc': 
Extension file not found. Unable to load package for
   '//google/protobuf:protobuf.bzl': BUILD file not found on package path.
INFO: Elapsed time: 0.097s
Run Code Online (Sandbox Code Playgroud)

是否需要额外的步骤(在README.md中没有提到)?

mrr*_*rry 7

这听起来像一个git子模块问题 - 它会影响从源代码构建TensorFlow的任何部分.要恢复,请在git存储库中运行以下命令:

$ git submodule update --init --recursive
Run Code Online (Sandbox Code Playgroud)

(还有很多其他方法可以做同样的事情:请参阅这个问题以获得一些建议.)