如何在Travis-CI上为TensorFlow构建共享库

时间:2016-07-19 03:00:37

标签: ruby tensorflow travis-ci bazel

我协助为Ruby-wrapper建立TensorFlow。明显。我们想要设置项目的自动测试,所以我{m} {m>} 尝试努力配置Travis-CI来构建项目并像我一样运行测试我自己的机器(OSX El Capitan)。

我的问题是:在.travis.yml - 文件中为TensorFlow正确bazel build共享库(tensorflow.so)需要具备什么魔力?

据我所知,我已经成功安装了currently,包括Google的构建工具TensorFlow's dependencies,但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 .

Bazel

注意:我注意到github.com/node-tensorflow/node-tensorflow上的那些人成功实现了这一点:https://travis-ci.org/chrhansen/tensorflow.rb/builds/145716589

更新:https://travis-ci.org/node-tensorflow/node-tensorflow/builds

1 个答案:

答案 0 :(得分:1)

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