编译 Facebook faiss 向量数据库

创建日期: 2024-03-06 10:38 | 作者: 风波 | 浏览次数: 13 | 分类: C++

编译环境

docker debian:12

下载代码

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

编译

安装依赖

  1. 安装 anaconda3 http://server:18680/Anaconda3-2024.02-1-Linux-x86_64.sh

  2. 安装其它依赖

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
13 浏览
10 爬虫
0 评论