从源构建Tensorflow服务时出错

问题描述 投票:1回答:1

我正在从适合我的CPU的源构建Tensorflow服务。我正在使用发布分支1.14和Bazel版本0.26.1。我使用以下命令进行构建:

tools/run_in_docker.sh bazel build --copt=-mavx2 --copt=-mfma --local_resources=2048,.5,1.0 tensorflow_serving/...

我正在使用具有8GB RAM的MacOS Mojave。错误:

/Users/user/PycharmProjects/serving/.cache/_bazel_user/28517966d062a7dca9cfa7e5166bc7fc/external/org_tensorflow/tensorflow/core/kernels/BUILD:5341:1: C++ compilation of rule '@org_tensorflow//tensorflow/core/kernels:training_ops' failed (Exit 4)
gcc: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
INFO: Elapsed time: 1399.895s, Critical Path: 100.48s
INFO: 101 processes: 101 local.
FAILED: Build did NOT complete successfully

我为此困扰了很长时间。在这方面的任何帮助将是有帮助的。

我使用了以下Tutotial

tensorflow tensorflow-serving
1个回答
0
投票

即使在注释部分中也可以在此处(在答案部分中指定解决方案,这是为了社区的利益。

通过将Docker Engine分配的RAM数量从2 GB增加到4 GB解决了问题。

© www.soinside.com 2019 - 2024. All rights reserved.