简介
Knowhere 是 Milvus 的核心向量执行引擎,集成了Faiss、Hnswlib和Annoy等多个向量相似度搜索库。
编译环境
操作系统: Ubuntu 22.04.4
gcc/g++:11.4.0
cmake: 3.27.7
安装依赖
shell
apt install build-essential libopenblas-dev libaio-dev python3-dev python3-pip
安装cmake:
https://cmake.org/files/v3.27/cmake-3.27.7-linux-x86_64.tar.gz
解压至/usr/local,并加入PATH环境变量(.bashrc)。
编译knowhere
下载源代码:
shell
git clone https://github.com/zilliztech/knowhere.git
本次编译的是v2.2.5
git checkout -b branch_v2.2.5 v2.2.5
编译:
shell
pip3 install conan==1.61.0
export PATH=$PATH:$HOME/.local/bin
mkdir build && cd build
conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libstdc++11 -s build_type=Release
conan build ..
跑测试用例:
shell
./Release/tests/ut/knowhere_tests