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

Illegal instruction (core dumped) on py3.7 #8

Closed
HaveF opened this issue Mar 12, 2020 · 2 comments
Closed

Illegal instruction (core dumped) on py3.7 #8

HaveF opened this issue Mar 12, 2020 · 2 comments

Comments

@HaveF
Copy link

HaveF commented Mar 12, 2020

hi, kyamagu,

Thanks for this repo!

Because I need py3.7, so I have to install faiss on py3.8

But without luck, here is the minial reproduce process:

docker run --rm  --name Test-service -ti python:3.7-buster sh

// then in the container

# pip install faiss-cpu
WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting faiss-cpu
  Downloading faiss_cpu-1.6.1-cp37-cp37m-manylinux2010_x86_64.whl (7.1 MB)
     |████████████████████████████████| 7.1 MB 330 kB/s 
Collecting numpy
  Downloading numpy-1.18.1-cp37-cp37m-manylinux1_x86_64.whl (20.1 MB)
     |████████████████████████████████| 20.1 MB 278 kB/s 
Installing collected packages: numpy, faiss-cpu
Successfully installed faiss-cpu-1.6.1 numpy-1.18.1
# python -c "import faiss"
Illegal instruction (core dumped)

But python:3.8 seems fine. Have any suggestion? Thanks in advance!

I also search the Illegal instruction (core dumped) issues in facebook's faiss repo, but most of them are 1.5.3 problem.

@kyamagu
Copy link
Owner

kyamagu commented Mar 12, 2020

@HaveF I could not reproduce your issue on my macbook pro. I suspect the cpu of the host hardware does not support certain set of instructions.

% docker run --rm -it python:3.7-buster bash
Unable to find image 'python:3.7-buster' locally
3.7-buster: Pulling from library/python
50e431f79093: Pull complete 
dd8c6d374ea5: Pull complete 
c85513200d84: Pull complete 
55769680e827: Pull complete 
f5e195d50b88: Pull complete 
94cdd3612287: Pull complete 
e01b42ee5411: Pull complete 
044dee574de1: Pull complete 
f6d53d5a5c86: Pull complete 
Digest: sha256:c701c51836b71b4d4654ddbac0af786d83b6cc1dad924844c4a3b61d0e4cf21f
Status: Downloaded newer image for python:3.7-buster
root@dbde9d9d52ee:/# pip install faiss-cpu
Collecting faiss-cpu
  Downloading faiss_cpu-1.6.1-cp37-cp37m-manylinux2010_x86_64.whl (7.1 MB)
     |████████████████████████████████| 7.1 MB 8.1 MB/s 
Collecting numpy
  Downloading numpy-1.18.1-cp37-cp37m-manylinux1_x86_64.whl (20.1 MB)
     |████████████████████████████████| 20.1 MB 22.1 MB/s 
Installing collected packages: numpy, faiss-cpu
Successfully installed faiss-cpu-1.6.1 numpy-1.18.1
root@dbde9d9d52ee:/# python -c "import faiss"
root@dbde9d9d52ee:/# 
root@dbde9d9d52ee:/# exit

@HaveF
Copy link
Author

HaveF commented Mar 12, 2020

It's very weird.
But I successful run with python:3.8 on the same machine.
I also test on 3.7-stretch, failed.

Maybe something related with avx/avx2, and python 3.8 fix it?

Well, It seems use python 3.8 is the good choice.

Thanks for your time again

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

2 participants