Summary
I am compiling FAISS while building an alpine docker image. If I follow the installation steps from INSTALL.md, swigfaiss_avx2.py and _swigfaiss_avx2.so are missing in pythons site-packages/faiss-1.8.0-py3.12.egg/faiss.
If I install the C++ headers and libraries before installing the python package, the AVX2-enabled python module and shared library are copied to site-packages/faiss-1.8.0-py3.12.egg/faiss as expected.
If there is a dependency between step 3 and step 4, it should be reflected in the INSTALL.md.
Platform
OS: alpine:3.20 linux/amd64
Faiss version: 1f42e81
Installed from: Compiled
Faiss compilation options:
FAISS_ENABLE_GPU=OFF
BUILD_TESTING=OFF
CMAKE_BUILD_TYPE=Release
FAISS_OPT_LEVEL=avx2
Running on:
Interface:
Reproduction instructions
- Create docker image using this Dockerfile
docker build --platform linux/amd64 -t missing-avx2 .
docker run -it missing-avx2 sh
ls -lah /usr/lib/python3.12/site-packages/faiss-1.8.0-py3.12.egg/faiss
- Verify that
swigfaiss_avx2.py is missing
For comparison, see this Dockerfile which reverses steps 3 and 4 from the installation instructions and therefore works.
Summary
I am compiling FAISS while building an alpine docker image. If I follow the installation steps from INSTALL.md,
swigfaiss_avx2.pyand_swigfaiss_avx2.soare missing in pythonssite-packages/faiss-1.8.0-py3.12.egg/faiss.If I install the C++ headers and libraries before installing the python package, the AVX2-enabled python module and shared library are copied to
site-packages/faiss-1.8.0-py3.12.egg/faissas expected.If there is a dependency between step 3 and step 4, it should be reflected in the INSTALL.md.
Platform
OS: alpine:3.20 linux/amd64
Faiss version: 1f42e81
Installed from: Compiled
Faiss compilation options:
FAISS_ENABLE_GPU=OFF
BUILD_TESTING=OFF
CMAKE_BUILD_TYPE=Release
FAISS_OPT_LEVEL=avx2
Running on:
Interface:
Reproduction instructions
docker build --platform linux/amd64 -t missing-avx2 .docker run -it missing-avx2 shls -lah /usr/lib/python3.12/site-packages/faiss-1.8.0-py3.12.egg/faissswigfaiss_avx2.pyis missingFor comparison, see this Dockerfile which reverses steps 3 and 4 from the installation instructions and therefore works.