kakao / buffalo

TOROS Buffalo: A fast and scalable production-ready open source project for recommender systems
Apache License 2.0
576 stars 106 forks source link

Build fails in ubuntu 18.04 #14

Closed amritanshujain closed 5 years ago

amritanshujain commented 5 years ago

I tried pip3 install buffalo as well as building buffalo from source. The build always fails at -

Scanning dependencies of target cbuffalo [ 12%] Building CXX object CMakeFiles/cbuffalo.dir/3rd/json11/json11.cpp.o [ 25%] Building CXX object CMakeFiles/cbuffalo.dir/lib/algo.cc.o virtual memory exhausted: Cannot allocate memory CMakeFiles/cbuffalo.dir/build.make:86: recipe for target 'CMakeFiles/cbuffalo.dir/lib/algo.cc.o' failed make[2]: *** [CMakeFiles/cbuffalo.dir/lib/algo.cc.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cbuffalo.dir/all' failed make[1]: *** [CMakeFiles/cbuffalo.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 error: command 'cmake' failed with exit status 2

I even tried building the docker image from the docker file and instructions you mentioned, it also fails on the very same step

ummae commented 5 years ago

@amritanshujain It seems to be lack of memory issue.

CMakeFiles/cbuffalo.dir/lib/algo.cc.o virtual memory exhausted: Cannot allocate memory 
amritanshujain commented 5 years ago

I suspected that. I am working on Mac OS, I built a vagrant box of ubuntu 18.04. Tried increasing the memory of vagrant box to 2gb, still it says memory exhausted. The same thing happens when I build from docker file, is it possible for memory being exhausted for docker as well. This error came around when building using docker -

Scanning dependencies of target cbuffalo [ 12%] Building CXX object CMakeFiles/cbuffalo.dir/3rd/json11/json11.cpp.o [ 25%] Building CXX object CMakeFiles/cbuffalo.dir/lib/algo.cc.o CMakeFiles/cbuffalo.dir/build.make:86: recipe for target 'CMakeFiles/cbuffalo.dir/lib/algo.cc.o' failed CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cbuffalo.dir/all' failed Makefile:129: recipe for target 'all' failed c++: 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. make[2]: *** [CMakeFiles/cbuffalo.dir/lib/algo.cc.o] Error 4 make[1]: *** [CMakeFiles/cbuffalo.dir/all] Error 2 make: *** [all] Error 2 error: command 'cmake' failed with exit status 2 The command '/bin/sh -c /bin/bash -c "source ./venv/bin/activate && git clone -b master https://github.com/kakao/buffalo.git buffalo.git && cd buffalo.git && git submodule update --init && python setup.py install && pip install -r requirements.txt"' returned a non-zero code: 1

Can I do something to resolve this?

ummae commented 5 years ago

Have you ever tried with Docker Desktop? Even with limited memory as 2GB, It still works on my Mac.

Screen Shot 2019-09-09 at 7 15 36 PM
amritanshujain commented 5 years ago

Hi, I am trying to set it up on a remote ubuntu machine The error it shows is -

cmake /tmp/pip-build-5eloa52o/buffalo -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/usr/lib/python3.6/site-packages/buffalo
    unable to execute 'cmake': No such file or directory
    error: command 'cmake' failed with exit status 1

Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5eloa52o/buffalo/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-06jr_kb6-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-5eloa52o/buffalo/
ummae commented 5 years ago

There are pre-required packages, please check out: https://buffalo-recsys.readthedocs.io/en/latest/intro.html#requirements. Is cmake installed?

ummae commented 5 years ago

This would be helpful https://github.com/kakao/buffalo/blob/dev/examples/Dockerfile#L4

amritanshujain commented 5 years ago

Thanks a lot. I built it from the source, I was going with pip install for the first time. You can close this issue 😄