TALP-UPC / FreeLing

FreeLing project source code
Other
252 stars 96 forks source link

Docker is not working! #108

Open arademaker opened 4 years ago

arademaker commented 4 years ago

Hi @lluisp , the https://github.com/TALP-UPC/FreeLing/tree/master/APIs/docker is not working! I noticed the link to release 4.2 is wrong and there is also an error in the compilation.

arademaker commented 4 years ago

do you have any particular reason for making it depend on debian instead of ubuntu 20:04?

lluisp commented 4 years ago

It seems some push was missing try it now. There is no special reason, I just found debian to be lighter and easier to use in CLI mode than ubuntu.

arademaker commented 4 years ago
...
   static const int PacketSize = internal::unpacket_traits<PacketReturnType>::size;
                    ^~~~~~~~~~
make[1]: *** [CMakeFiles/Makefile2:145: src/libdynet/dynet/CMakeFiles/dynet.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
The command '/bin/sh -c export FL_VERSION=4.2 &&     cd /tmp &&     echo "******** Downloading FreeLing... please wait" &&     wget --progress=dot:giga https://github.com/TALP-UPC/FreeLing/releases/download/$FL_VERSION/FreeLing-src-$FL_VERSION.tar.gz &&     wget --progress=dot:giga https://github.com/TALP-UPC/FreeLing/releases/download/$FL_VERSION/FreeLing-langs-src-$FL_VERSION.tar.gz &&     echo "******** Uncompressing FreeLing... please wait" &&     tar xzf FreeLing-src-$FL_VERSION.tar.gz &&     tar xzf FreeLing-langs-src-$FL_VERSION.tar.gz &&     rm -rf FreeLing-src-$FL_VERSION.tar.gz FreeLing-langs-src-$FL_VERSION.tar.gz &&     cd /tmp/FreeLing-$FL_VERSION &&     mkdir build &&     cd build &&     echo "******** Compiling FreeLing... please wait" &&     cmake .. -DJAVA_API=ON -DPYTHON3_API=ON -Wno-dev &&     make -j8 &&     echo "******** Installing FreeLing... please wait" &&     make -j8 install &&     cd &&     rm -rf /tmp/FreeLing-$FL_VERSION &&     apt-get --purge -y remove build-essential libicu-dev             libboost-regex-dev libboost-system-dev             libboost-program-options-dev libboost-thread-dev        libboost-filesystem-dev zlib1g-dev            cmake wget swig python3-dev &&     apt-get clean -y &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 2

In the current version, I am still getting the error above.

lluisp commented 4 years ago

That's weird, it works for me...

In any case, a few more context lines of the error could be helpful. Only knowing where the compiler is unhappy but not what is it dislikes is not much information...

arademaker commented 4 years ago

I don't know how much context you need. Attaching the log of the session.

freeling.log.zip

lluisp commented 4 years ago

Compilation is multithread. When one file fails, more messages appear of files that were already being processed before the building stops. So, the last message in the log does not correspond to the actual error.

The actual error is:

c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
mmake[2]: *** [src/libdynet/dynet/CMakeFiles/dynet.dir/build.make:336: src/libdynet/dynet/CMakeFiles/dynet.dir/nodes-affinetransform.cc.o] Error 1
mmake[2]: *** Waiting for unfinished jobs....

(After this, a lot of stuff of remaining unfinished jobs)

So, it seems that the compiler was killed Notice that docker uses the resources in the host operating system. So, if you have a docker container running, and you see some processes in your system that you did not launch, don't kill them, they are the docker processes.

If you didn't kill it, make sure you don't have some kind of process control that kills processes when the system is too busy.

If that is the cause, you may lighten the load editing the Dockerfile and replacing "-j8" with "-j4" or "-j2" in the lines 33 and 35 : make -j8 make -j8 install

arademaker commented 4 years ago

No, I didn't kill anything! I don't have any special process controlling the use of resources in my machine. Trying now if -j4.

dcshapiro commented 3 years ago

same issue. Trying with j4. FYI this is a wonderful library + thank you

dcshapiro commented 3 years ago

It works now @lluisp . The issue was an out-of-memory error (OOM) resulting from too little RAM on the VM. Added RAM. Works great.