README.md 6.2 KB
Newer Older
J
jielinxu 已提交
1
![Milvuslogo](https://milvus.io/docs/assets/milvus_logo.png)
J
jielinxu 已提交
2

J
jielinxu 已提交
3 4
![LICENSE](https://img.shields.io/badge/license-Apache--2.0-brightgreen)
![Language](https://img.shields.io/badge/language-C%2B%2B-blue)
Y
yinghao.zou 已提交
5
[![Twitter Follow](https://img.shields.io/twitter/follow/milvusio.svg?style=social&label=Follow)](https://twitter.com/milvusio)
J
jielinxu 已提交
6

J
JinHai-CN 已提交
7
- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
J
jielinxu 已提交
8
- [Twitter](https://twitter.com/milvus_io)
J
jielinxu 已提交
9 10
- [Blog](https://www.milvus.io/blog/)
- [CSDN](https://zilliz.blog.csdn.net/)
J
jielinxu 已提交
11
- [中文官网](https://www.milvus.io/zh-CN/)
J
jielinxu 已提交
12

J
JinHai-CN 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

# Welcome to Milvus

Firstly, welcome, and thanks for your interest in [Milvus](https://milvus.io)! No matter who you are, what you do, we greatly appreciate your contribution to help us reinvent data science with Milvus.

## What is Milvus

Milvus is an open source vector search engine that supports similarity search of large-scale vectors. Built on optimized indexing algorithm, it is compatible with major AI/ML models.

Milvus was developed by ZILLIZ, a tech startup that intends to reinvent data science, with the purpose of providing enterprises with efficient and scalable similarity search and analysis of feature vectors and unstructured data. 

Milvus provides stable Python, C++ and Java APIs.

Keep up-to-date with newest releases and latest updates by reading Milvus [release notes](https://milvus.io/docs/en/Releases/v0.4.0/).

- GPU-accelerated search engine

  Milvus is designed for the largest scale of vector index. CPU/GPU heterogeneous computing architecture allows you to process data at a speed 1000 times faster.

- Intelligent index

  With a “Decide Your Own Algorithm” approach, you can embed machine learning and advanced algorithms into Milvus without the headache of complex data engineering or migrating data between disparate systems. Milvus is built on optimized indexing algorithm based on quantization indexing, tree-based and graph indexing methods.

- Strong scalability

  The data is stored and computed on a distributed architecture. This lets you scale data sizes up and down without redesigning the system.

## Architecture
![Milvus_arch](https://milvus.io/docs/assets/milvus_arch.png)

## Get started

J
jielinxu 已提交
45
### Install using docker
J
JinHai-CN 已提交
46 47 48

Use Docker to install Milvus is a breeze. See the [Milvus install guide](https://milvus.io/docs/en/userguide/install_milvus/) for details.

J
jielinxu 已提交
49
### Build from source
J
JinHai-CN 已提交
50

J
jielinxu 已提交
51
#### Software requirements
J
JinHai-CN 已提交
52

J
jielinxu 已提交
53 54 55 56
- Ubuntu 18.04 or higher
- CMake 3.14 or higher
- CUDA 10.0 or higher
- NVIDIA driver 418 or higher
J
JinHai-CN 已提交
57

J
jielinxu 已提交
58
#### Compilation
J
JinHai-CN 已提交
59

J
jielinxu 已提交
60
##### Step 1 Install dependencies
J
JinHai-CN 已提交
61 62

```shell
J
jielinxu 已提交
63 64
$ cd [Milvus sourcecode path]/core
./ubuntu_build_deps.sh
J
JinHai-CN 已提交
65 66
```

J
jielinxu 已提交
67
##### Step 2 Build
J
JinHai-CN 已提交
68 69 70 71 72 73 74 75 76 77

```shell
$ cd [Milvus sourcecode path]/core
$ ./build.sh -t Debug
or 
$ ./build.sh -t Release
```

When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`.

J
jielinxu 已提交
78
#### Code format and linting
J
JinHai-CN 已提交
79

J
jielinxu 已提交
80 81 82
Install clang-format
```shell
$ sudo apt-get install clang-format
J
JinHai-CN 已提交
83
$ rm cmake_build/CMakeCache.txt
J
jielinxu 已提交
84
```
J
JinHai-CN 已提交
85 86 87 88 89 90 91 92 93 94
Check code style
```shell
$ ./build.sh -l
```
To format the code
```shell
$ cd cmake_build
$ make clang-format
```

J
jielinxu 已提交
95
#### Run unit test
J
JinHai-CN 已提交
96 97 98 99 100

```shell
$ ./build.sh -u
```

J
jielinxu 已提交
101
#### Run code coverage
J
jielinxu 已提交
102

J
JinHai-CN 已提交
103 104 105
Install lcov
```shell
$ sudo apt-get install lcov
J
jielinxu 已提交
106
```
J
JinHai-CN 已提交
107 108 109
```shell  
$ ./build.sh -u -c
```
J
jielinxu 已提交
110
Run MySQL docker
J
JinHai-CN 已提交
111 112 113 114 115
```shell 
docker pull mysql:latest
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
```
Run code coverage
J
jielinxu 已提交
116

J
JinHai-CN 已提交
117 118 119 120
```shell  
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
```

J
jielinxu 已提交
121 122 123 124 125 126
Or start your own MySQL server, and then run code coverage

```shell
$ ./coverage.sh -u ${MYSQL_USERNAME} -p ${MYSQL_PASSWORD} -t ${MYSQL_SERVER_IP}
```

J
jielinxu 已提交
127
#### Launch Milvus server
J
JinHai-CN 已提交
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

```shell
$ cd [Milvus root path]/core/milvus
```

Add `lib/` directory to `LD_LIBRARY_PATH`

```
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/lib
```

Then start Milvus server:

```
$ cd scripts
$ ./start_server.sh
```

To stop Milvus server, run:

```shell
$ ./stop_server.sh
```

To edit Milvus settings in `conf/server_config.yaml` and `conf/log_config.conf`, please read [Milvus Configuration](https://www.milvus-io/docs/master/reference/milvus_config.md).

### Try your first Milvus program

#### Run Python example code

Make sure [Python 3.4](https://www.python.org/downloads/) or higher is already installed and in use.

Install Milvus Python SDK.

```shell
# Install Milvus Python SDK
$ pip install pymilvus==0.2.0
```

J
jielinxu 已提交
167
Create a new file `example.py`, and add [Python example code](https://github.com/milvus-io/pymilvus/blob/master/examples/AdvancedExample.py) to it.
J
JinHai-CN 已提交
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183

Run the example code.

```python
# Run Milvus Python example
$ python3 example.py
```

#### Run C++ example code

```shell
 # Run Milvus C++ example
 $ cd [Milvus root path]/core/milvus/bin
 $ ./sdk_simple
```

J
jielinxu 已提交
184 185 186
#### Run Java example code
Make sure Java 8 or higher is already installed.

J
jielinxu 已提交
187
Refer to [this link](https://github.com/milvus-io/milvus-sdk-java/tree/master/examples) for the example code.
J
jielinxu 已提交
188

J
JinHai-CN 已提交
189 190
## Contribution guidelines

J
jielinxu 已提交
191
Contributions are welcomed and greatly appreciated. If you want to contribute to Milvus, please read our [contribution guidelines](CONTRIBUTING.md). This project adheres to the [code of conduct](CODE_OF_CONDUCT.md) of Milvus. By participating, you are expected to uphold this code.
J
JinHai-CN 已提交
192

J
jielinxu 已提交
193
We use [GitHub issues](https://github.com/milvus-io/milvus/issues/new/choose) to track issues and bugs. For general questions and public discussions, please join our community.
J
JinHai-CN 已提交
194 195 196 197 198 199 200 201 202 203 204 205 206

## Join the Milvus community

To connect with other users and contributors, welcome to join our [slack channel](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk). 

## Milvus Roadmap

Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upcoming features.

## Resources

[Milvus official website](https://www.milvus.io)

J
jielinxu 已提交
207
[Milvus docs](https://www.milvus.io/docs/en/userguide/install_milvus/)
J
JinHai-CN 已提交
208

J
jielinxu 已提交
209 210
[Milvus bootcamp](https://github.com/milvus-io/bootcamp)

J
JinHai-CN 已提交
211 212
[Milvus blog](https://www.milvus.io/blog/)

J
jielinxu 已提交
213
[Milvus CSDN](https://zilliz.blog.csdn.net/)
J
JinHai-CN 已提交
214 215 216 217 218 219

[Milvus roadmap](https://milvus.io/docs/en/roadmap/)


## License

J
jielinxu 已提交
220
[Apache 2.0 license](milvus-io/milvus/LICENSE.md)