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

标签 ruby tensorflow travis-ci bazel

我正在协助构建 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

最佳答案

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

关于ruby - 如何在 Travis-CI 上为 TensorFlow 构建共享库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38448897/

相关文章:

ruby-on-rails - Rails 在哪里存储通过在测试期间保存 activerecord 对象创建的数据?

machine-learning - 在 tensorflow 教程中训练深度神经网络时的纳米损失

python - 如何在 CNTK Sequential 中添加两层

php - 由于 Composer 命令调用,Travis-CI 的构建失败

c++ - 与 Travis 一起使用 bii 时要在 gitignore 中放些什么

ruby - 如何从字符串中删除转义字符? UTF 的问题?

ruby - Ruby 中的类名别名

ruby - 在 Lisp/Ruby 中将 IF-ELSE 实现为过程

python - Tensorflow 导入错误 : No module named '_pywrap_tensorflow_internal' on Windows 10

travis-ci - Travis CI - 通过 API 启用存储库构建