faiss的编译过程

faiss开源后,为特征检索带来了一个新的途径。因此,开始在自己的主机上编译安装faiss。

本篇文章主要记录下我在centOS7.4上安装faiss cpu版本的一个过程。

【开发环境】

OS          CentOS 7.4

faiss        官方git上的64位发布版本

python     python2.7(系统自带)

【安装过程】

# 安装依赖

yum install -y openblas swig

 

# 获取 faiss 源代码

git clone https://github.com/facebookresearch/faiss.git

 

# 编译 faiss

cd faiss

./configure  & make & make install 

# 编译 python 接口

make py

 

# 设置优化选项

export OMP_WAIT_POLICY=PASSIVE

 

# 运行 python 示例代码

python tutorial/python/1-Flat.py

python tutorial/python/2-IVFFlat.py

python tutorial/python/3-IVFPQ.py

 

你可能感兴趣的:(faiss的编译过程)