lyst / lightfm

A Python implementation of LightFM, a hybrid recommendation algorithm.
Apache License 2.0
4.73k stars 691 forks source link

Illegal instruction (core dumped) soon after starting to fit #580

Open pedro-f-nogueira opened 3 years ago

pedro-f-nogueira commented 3 years ago

This error is somewhat weird and seems to violate docker principles. Here is the explanation for it:

This is similar or exactly the same as https://github.com/lyst/lightfm/issues/559#issuecomment-719418835 and I can't seem to find a solution using pip to make this package work in a docker scenario where the image is built in one machine and then moved to another. Any idea on how to fix it?

SimonCW commented 3 years ago

Hi @pedro-f-nogueira ,

as far as I know the Illegal Instruction Error often occurs when CPU instructions are called that don't exist for your CPU. This is something that is NOT abstracted away by Docker.

I'm not an expert on this but you could try to set the LIGHTFM_NO_CFLAGS environment variable, clone the Repo, and install locally. That way, you should be fine on most CPUs at the cost of some performance. You could also use conda within your Docker container and install lightfm1.16.

Hope this helps.

taylorsmithgg commented 2 years ago

+1 for conda. For reference: I was encountering the core dumps on a GPU notebook w/docker.