编译环境
docker debian:12
下载代码
git clone https://github.com/facebookresearch/faiss.git
编译
安装依赖
-
安装
anaconda3
http://server:18680/Anaconda3-2024.02-1-Linux-x86_64.sh -
安装其它依赖
add-apt-repository universe
apt update
apt install -y libfmt-dev libblas-dev liblapack-dev swig
如果不是安装的 anaconda3
那么需要安装 python3.11 python3.11-dev
编译不带GPU的版本
cmake -DFAISS_ENABLE_GPU=OFF && make
编译带 GPU的版本
cd faiss && mkdir build && cd build && cmake .. && make