• This repository has been archived on 16/Aug/2023
  • Stars
    star
    201
  • Rank 194,491 (Top 4 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created almost 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Knowhere is an open-source vector search engine, integrating FAISS, HNSW, etc.

Knowhere Logo

This document will help you to build the Knowhere repository from source code and to run unit tests. Please file an issue if there's a problem.

Introduction

Knowhere is written in C++. It is an independent project that act as Milvus's internal core.

Building Knowhere Within Milvus

If you wish to only use Knowhere within Milvus without changing any of the Knowhere source code, we suggest that you move to the Milvus main project and build Milvus directly, where Knowhere is then built implicitly during Milvus build.

System Requirements

All Linux distributions are available for Knowhere development. However, a majority of our contributor worked with Ubuntu or CentOS systems, with a small portion of Mac (both x86_64 and Apple Silicon) contributors. If you would like Knowhere to build and run on other distributions, you are more than welcome to file an issue and contribute!

Here's a list of verified OS types where Knowhere can successfully build and run:

  • Ubuntu 20.04 x86_64
  • Ubuntu 20.04 Aarch64
  • MacOS (x86_64)
  • MacOS (Apple Silicon)

Building Knowhere From Source Code

Install Dependencies

$ sudo apt install build-essential libopenblas-dev libaio-dev python3-dev python3-pip
$ pip3 install conan==1.59.0 --user
$ export PATH=$PATH:$HOME/.local/bin

Build From Source Code

  • Ubuntu 20.04
$ mkdir build && cd build
#DEBUG CPU
$ conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libstdc++11 -s build_type=Debug
#RELEASE CPU
$ conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libstdc++11 -s build_type=Release
#DEBUG GPU
$ conan install .. --build=missing -o with_ut=True -o with_raft=True -s compiler.libcxx=libstdc++11 -s build_type=Debug
#RELEASE GPU
$ conan install .. --build=missing -o with_ut=True -o with_raft=True -s compiler.libcxx=libstdc++11 -s build_type=Release
#DISKANN SUPPORT
$ conan install .. --build=missing -o with_ut=True -o with_diskann=True -s compiler.libcxx=libstdc++11 -s build_type=Debug/Release
#build with conan
$ conan build ..
#verbose
export VERBOSE=1
  • MacOS
#RELEASE CPU
conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libc++ -s build_type=Release
#DEBUG CPU
conan install .. --build=missing -o with_ut=True -s compiler.libcxx=libc++ -s build_type=Debug

Running Unit Tests

# in build directories
#Debug
$ ./Debug/tests/ut/knowhere_tests
#Release
$ ./Release/tests/ut/knowhere_tests

Clean up

$ git clean -fxd

GEN PYTHON WHEEL(NEED REALSE BUILD)

install dependency:

sudo apt install swig python3-dev

after build knowhere:

cd python
python3 setup.py bdist_wheel

install knowhere wheel:

pip3 install dist/knowhere-1.0.0-cp38-cp38-linux_x86_64.whl

clean

cd python
rm -rf build
rm -rf dist
rm -rf knowhere.egg-info
rm knowhere/knowhere_wrap.cpp
rm knowhere/swigknowhere.py

More Repositories

1

milvus

A cloud-native vector database, storage for next generation AI applications
Go
29,817
star
2

bootcamp

Dealing with all unstructured data, such as reverse image search, audio search, molecular search, video analysis, question and answer systems, NLP, etc.
HTML
1,827
star
3

pymilvus

Python SDK for Milvus.
Python
993
star
4

milvus-sdk-java

Java SDK for Milvus.
Java
384
star
5

milvus-sdk-go

Go SDK for Milvus.
Go
338
star
6

milvus-lite

A lightweight version of Milvus
Python
274
star
7

milvus-sdk-node

The Official Mivus node.js sdk(client)
TypeScript
123
star
8

web-content

Milvus web documents and contents
MDX
120
star
9

milvus-insight

Milvus management GUI
TypeScript
90
star
10

milvus-sdk-csharp

C# SDK for Milvus.
C#
88
star
11

milvus-helm

The helm chart to deploy Milvus
Mustache
78
star
12

milvus-docs

This repository is for Milvus technical documentation update and maintenance. Visit Milvus.io for fully rendered technical documents.
Python
72
star
13

milvus-tools

A data migration tool for Milvus.
Python
69
star
14

milvus-operator

milvus-operator
Go
61
star
15

milvus-sdk-rust

Rust SDK for Milvus.
Rust
58
star
16

birdwatcher

Go
44
star
17

milvus.io

Milvus official website.
TypeScript
43
star
18

milvus-sdk-cpp

C++ SDK for Milvus 2.0
C++
36
star
19

milvus_cli

Milvus Command Line
Python
33
star
20

community

Where community members can share ideas, collaborate and learn from each other.
32
star
21

milvus-proto

Share Milvus proto files between Milvus repository and SDK repositories
Shell
24
star
22

pymilvus-orm

Python
20
star
23

milvus-model

The embedding/reranking model zoo help user to convert their unstructured data into embeddings
Python
19
star
24

milvus-storage

Milvus file storage format repo
C++
19
star
25

milvus-tutorials

milvus tutorials
19
star
26

milvus-haystack

Python
8
star
27

milvus-demo-chat-bot

TypeScript
7
star
28

milvus-demo-image-search

JavaScript
7
star
29

milvusctl

Go
5
star
30

hero-bot

extract heros (contributor) from repo
JavaScript
5
star
31

homebrew-milvus

homebrew for milvus ecosystem
Ruby
2
star
32

conanfiles

Conanfiles for managing third-party packages that Milvus depends on
Python
2
star
33

provider-milvus

milvus provider for crossplane
Go
2
star
34

milvus-demo-movie-taste

JavaScript
2
star
35

milvus-demo-video-search

JavaScript
2
star
36

milvus-rpm

Build rpm package for milvus
Shell
1
star
37

milvus-deb

Shell
1
star
38

pymilvus-assets

Large models, etc. for pymilvus
1
star