Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual memory exhausted building in docker - update instructions? #54

Open
alexanderkjeldaas opened this issue Dec 23, 2016 · 6 comments

Comments

@alexanderkjeldaas
Copy link

There might be some docker-tuning that needs to be mentioned in README.md.

        ... 179 more jobs
____[1,760 / 2,373] Compiling tensorflow/core/kernels/matching_files_op.cc
ERROR: /tensorflow/tensorflow/core/kernels/BUILD:76:1: C++ compilation of rule '//tensorflow/core/kernels:strided_slice_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 106 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
virtual memory exhausted: Cannot allocate memory
____Building complete.
Target //tensorflow:libtensorflow_c.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
____Elapsed time: 974.415s, Critical Path: 907.05s
@alexanderkjeldaas
Copy link
Author

Average server with 16G memory.

@irhawks
Copy link

irhawks commented Dec 30, 2016

Hi, I met the same problem in compiling TensorFlow in docker environment and I solved this with

bazel --batch build -c opt '//tensorflow:libtensorflow_c.so' --jobs=1

All in one, adding --jobs=1 (bazel's default is 200) when invoking bazel. (in docker/Dockerfile)

@mikeronayne
Copy link

mikeronayne commented Feb 27, 2017

@irhawks

Hi, I met the same problem in compiling TensorFlow in docker environment and I solved this with

bazel --batch build -c opt '//tensorflow:libtensorflow_c.so' --jobs=1
All in one, adding --jobs=1 (bazel's default is 200) when invoking bazel. (in docker/Dockerfile)

Hi, I also exhausted my virtual memory when trying to install SyntaxNet from this Dockerfile using the Docker Toolbox. I received this message when compiling the Dockerfile:

ERROR: /root/.cache/bazel/_bazel_root/5b21cea144c0077ae150bf0330ff61a0/external/org_tensorflow/tensorflow/core/kernels/BUILD:1921:1: C++ compilation of rule '@org_tensorflow//tensorflow/core/kernels:svd_op' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-canonical-system-headers ... (remaining 115 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1. virtual memory exhausted: Cannot allocate memory ____Building complete. ____Elapsed time: 8548.364s, Critical Path: 8051.91s

Where should I be changing Bazel's default jobs limit?

@blackgnezdo
Copy link
Contributor

blackgnezdo commented Mar 1, 2017 via email

@akkiagrawal94
Copy link

Hi I tried to install tensor flow serving using docker
After running this bazel build -c opt tensorflow_serving/... got an error

image
Please help me out with this

@blackgnezdo
Copy link
Contributor

You should ask for help on this in tensorflow/serving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants