为 Raspberry Pi 构建张量流



我正在尝试使用官方文档从树莓派的源代码构建张量流,但它在构建过程的早期就失败了。

我正在尝试构建标签v2.0.0.

我正在Ubuntu 18.04.3上运行以下内容:

CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.4" tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3 tensorflow/tools/ci_build/pi/build_raspberry_pi.sh

我失败了:

Loading: 
Loading: 0 packages loaded
Analyzing: 4 targets (3 packages loaded, 0 targets configured)
ERROR: /home/fgervais/personal/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_fgervais/eab0d61a99b6696edb3d2aff87b585e8/external/local_config_arm_compiler/BUILD:32:1: @local_config_arm_compiler//:cc-compiler-local: missing value for mandatory attribute 'toolchain_config' in 'cc_toolchain' rule
ERROR: /home/fgervais/personal/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_fgervais/eab0d61a99b6696edb3d2aff87b585e8/external/local_config_arm_compiler/BUILD:45:1: @local_config_arm_compiler//:cc-compiler-armeabi: missing value for mandatory attribute 'toolchain_config' in 'cc_toolchain' rule
INFO: Call stack for the definition of repository 'nsync' which is a tf_http_archive (rule definition at /workspace/third_party/repo.bzl:124:19):
- /workspace/tensorflow/workspace.bzl:444:5
- /workspace/WORKSPACE:19:1
INFO: Call stack for the definition of repository 'arm_compiler' which is a tf_http_archive (rule definition at /workspace/third_party/repo.bzl:124:19):
- /workspace/tensorflow/workspace.bzl:180:5
- /workspace/WORKSPACE:19:1
ERROR: /home/fgervais/personal/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_fgervais/eab0d61a99b6696edb3d2aff87b585e8/external/local_config_arm_compiler/BUILD:32:1: Target '@local_config_arm_compiler//:empty' contains an error and its package is in error and referenced by '@local_config_arm_compiler//:cc-compiler-local'
ERROR: /home/fgervais/personal/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_fgervais/eab0d61a99b6696edb3d2aff87b585e8/external/local_config_arm_compiler/BUILD:7:1: Target '@local_config_arm_compiler//:cc-compiler-armeabi' contains an error and its package is in error and referenced by '@local_config_arm_compiler//:toolchain'
ERROR: /home/fgervais/personal/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_fgervais/eab0d61a99b6696edb3d2aff87b585e8/external/local_config_arm_compiler/BUILD:7:1: Target '@local_config_arm_compiler//:cc-compiler-local' contains an error and its package is in error and referenced by '@local_config_arm_compiler//:toolchain'
ERROR: /workspace/tensorflow/tools/benchmark/BUILD:70:1: every rule of type cc_binary implicitly depends upon the target '@local_config_arm_compiler//:toolchain', but this target could not be found because of: Target '@local_config_arm_compiler//:toolchain' contains an error and its package is in error
ERROR: Analysis of target '//tensorflow/tools/benchmark:benchmark_model' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.914s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (54 packages loaded, 82 targets configured)
FAILED: Build did NOT complete successfully (54 packages loaded, 82 targets configured)

通过 docker 构建应该是非常可重现的,我不确定我这边可能有什么问题会导致它失败。

知道出了什么问题吗?

我不完全确定,但即使构建是通过可重复的 docker 环境完成的,并且该标签v2.0.0是一个稳定的 TensorFlow 版本,似乎树莓派的构建被破坏了。

我只能说它在版本v2.1.0-rc0v2.1.0-rc1中已修复。

对两个标记使用以下命令:

CI_DOCKER_EXTRA_PARAMS="-e CI_BUILD_PYTHON=python3 -e CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/include/python3.4"     tensorflow/tools/ci_build/ci_build.sh PI-PYTHON3     tensorflow/tools/ci_build/pi/build_raspberry_pi.sh

我成功地生成了这些轮子:

tensorflow-2.1.0rc0-cp35-none-linux_armv7l.whl
tensorflow-2.1.0rc1-cp35-none-linux_armv7l.whl

最新更新