Build faiss on Alpine in 2025 #4372
Replies: 6 comments
-
|
We do support Linux: https://github.com/facebookresearch/faiss/wiki/Installing-Faiss |
Beta Was this translation helpful? Give feedback.
-
|
@synergiator please install standard things, such as python and numpy, as specified in the error message |
Beta Was this translation helpful? Give feedback.
-
|
@alexanderguzhva @gtwang01 thank you both for your quick answers! After further investigation, I think now the root issue is that faiss typically compiles well against MKL (Intel Math Kernel Library) which again is based on Fortran. There is no MKL support for Alpine afaik - therefore for example the faiss-cpu Python package includes a precompiled version of faiss for Debian/Ubuntu, but not for Alpine. An alternative to MKL might be OpenBLAS, and the compilation even works with the below Dockerfile - unfortunately, many tests fail in the end, those who wrote them will know better why. But compilation has worked! 😆 🤦 DockerfileUnit test failures |
Beta Was this translation helpful? Give feedback.
-
unlikely. There's a definite problem with the compilation. Are you sure that you're not missing anything? Say, something like cmake .. \
-DBUILD_TESTING=ON \
-DFAISS_ENABLE_GPU=OFF \
-DFAISS_OPT_LEVEL=axv2 \
-DFAISS_ENABLE_C_API=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBLA_VENDOR=OpenBLAS && \
make -j"$(nproc)" faiss_avx2 && \
make -j"$(nproc)" swigfaiss && \As far as I remember, you need to build |
Beta Was this translation helpful? Give feedback.
-
|
on updated Dockerfile, it takes now longer time to compile, but unfortunately same failures. |
Beta Was this translation helpful? Give feedback.
-
|
Same with this one as you have mentioned another option. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to build faiss on Alpine? In recent years there have been reports on issues with that.
I have some different approaches but something is missing:
Beta Was this translation helpful? Give feedback.
All reactions