Tensorflow 构建错误

Tensorflow Build error

嘿,我是 Tensorflow 的新手,我从 git (https://github.com/tensorflow/serving) 获得了 tensorflow 代码,当我尝试使用文档中的步骤构建它时,我遇到了这个错误:

ERROR: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '': Extension file not found. Unable to load package for '@org_tensorflow//tensorflow:workspace.bzl': BUILD file not found on package path. INFO: Elapsed time: 0.081s

这可能是因为您没有递归克隆 (git clone --recurse-submodules https://github.com/tensorflow/serving),所以 TensorFlow 没有作为子模块被克隆,Bazel 找不到 TensorFlow 本身。

https://github.com/tensorflow/serving/blob/master/tensorflow_serving/g3doc/setup.md#clone-the-tensorflow-serving-repository