20

我正在协助为TensorFlow构建一个Ruby 包装器。明显地。我们想要设置项目的自动测试,所以我目前正在努力配置 Travis-CI 来构建项目并像在我自己​​的机器(OSX El Capitan)上一样运行测试。

我的问题是:为了正确地为 TensorFlow共享库( ) ,需要在.travis.yml-file 中添加什么魔法?bazel buildtensorflow.so

据我所知,我已经成功安装了TensorFlow 的依赖项,包括 Google 的构建工具Bazel,但 Travis-CI 仍然无法构建。在撰写本文时,bazel build命令失败并显示以下消息:

...
...
INFO: Building...
[1 / 13] Writing file external/gif_archive/libgif.so-2.params
[3 / 13] Compiling external/gif_archive/giflib-5.1.4/lib/egif_lib.c
ERROR: /home/travis/.cache/bazel/_bazel_travis/1a58902034d650eeef2a9da5b1248179/external/gif_archive/BUILD:14:1: C++ compilation of rule '@gif_archive//:gif' failed: namespace-sandbox failed: error executing command 
  (cd /home/travis/.cache/bazel/_bazel_travis/1a58902034d650eeef2a9da5b1248179/execroot/tensorflow && \
  exec env - \
...
...
The command "bazel build --verbose_failures=1 @gif_archive//:gif" failed and exited with 1 during .

https://travis-ci.org/chrhansen/tensorflow.rb/builds/145716589

注意:我注意到 github.com/node-tensorflow/node-tensorflow 上的人成功地做到了这一点:https ://travis-ci.org/node-tensorflow/node-tensorflow/builds

更新:https ://github.com/tensorflow/tensorflow/issues/3374

4

1 回答 1

1

问题已解决(https://github.com/tensorflow/tensorflow/issues/3374),您应该能够在启用沙箱的情况下构建 tensorflow。

于 2017-10-02T14:31:00.043 回答