我正在协助构建 Ruby-wrapper对于TensorFlow .明显地。我们想设置项目的自动测试,所以我是 currently trying 努力配置 Travis-CI 来构建项目并像在我自己的机器 (OSX El Capitan) 上一样运行测试。
我的问题是:.travis.yml
文件中需要什么魔力才能正确bazel build
共享库 (tensorflow.所以
) 用于 TensorFlow?
据我所知,我已经成功安装了 TensorFlow's dependencies ,包括 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),您应该能够在启用沙箱的情况下构建 tensorflow。
关于ruby - 如何在 Travis-CI 上为 TensorFlow 构建共享库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38448897/