Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
faiss python wheel packages.
This repository provides scripts to build wheel packages for the faiss library.
There is also a source package to customize the build process.
Note GPU package has been supported until version 1.7.2, but is not available since version 1.7.3 due to the PyPI limitation.
Install a binary package by:
pip install faiss-cpu
If there is a custom built faiss library in the system, build source package for the best performance.
The source package assumes faiss is already built and installed in the system. Build and install the faiss library first.
cd faiss
cmake . -B build -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DFAISS_OPT_LEVEL=avx512
cmake --build build --config Release -j
cmake --install build install
cd ..
See the official faiss installation instruction for more on how to build and install faiss.
For building sdist, swig 3.0.12 or later needs to be available.
The following builds and installs the faiss-cpu source package with AVX512.
export FAISS_OPT_LEVEL=avx512
pip install --no-binary :all: faiss-cpu
The following example builds a GPU wheel.
export FAISS_ENABLE_GPU=ON
pip install --no-binary :all: faiss-cpu
There are a few environment variables that specifies build-time options.
FAISS_INSTALL_PREFIX
: Specifies the install location of faiss library, default to /usr/local
.FAISS_OPT_LEVEL
: Faiss SIMD optimization, one of generic
, avx2
, avx512
. Note that AVX option is only available in x86_64 arch.FAISS_ENABLE_GPU
: Setting this variable to ON
builds GPU wrappers. Set this variable if faiss is built with GPU support.CUDA_HOME
: Specifies CUDA install location for building GPU wrappers, default to /usr/local/cuda
.FAQs
A library for efficient similarity search and clustering of dense vectors.
We found that faiss-cpu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.