README.md 6.5 KB
Newer Older
J
jielin.xu 已提交
1 2
- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
- [Blog](https://www.milvus.io/blog/)
J
jielin.xu 已提交
3

J
jielin.xu 已提交
4
# Welcome to Milvus
G
groot 已提交
5

J
jielin.xu 已提交
6
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.
Z
zhiru 已提交
7

J
jielin.xu 已提交
8
## What is Milvus
Z
zhiru 已提交
9

J
jielin.xu 已提交
10
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.
J
jielin.xu 已提交
11

J
jielin.xu 已提交
12
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. 
J
jielin.xu 已提交
13

J
jielin.xu 已提交
14
Milvus provides stable Python, C++ and Java APIs.
J
jielin.xu 已提交
15

J
jielin.xu 已提交
16
Keep up-to-date with newest releases and latest updates by reading Milvus [release notes](https://milvus.io/docs/en/Releases/v0.4.0/).
J
jielin.xu 已提交
17 18 19 20 21 22 23 24 25 26 27 28 29

- 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.

J
jielin.xu 已提交
30
## Architecture
31
![Milvus_arch](https://milvus.io/docs/assets/milvus_arch.png)
J
jielin.xu 已提交
32

J
jielin.xu 已提交
33 34 35 36 37 38
## Get started

### Install and start Milvus server

#### Use Docker

J
jielin.xu 已提交
39
Use Docker to install Milvus is a breeze. See the [Milvus install guide](https://milvus.io/docs/en/userguide/install_milvus/) for details.
J
jielin.xu 已提交
40 41 42 43 44 45 46 47 48 49

#### Use source code

##### Compilation

###### Step 1 Install necessary tools

```shell
# Install tools
Centos7 : 
50 51
$ yum install gfortran qt4 flex bison 
$ yum install mysql-devel mysql
J
jielin.xu 已提交
52
    
53
Ubuntu 16.04 or 18.04: 
54 55
$ sudo apt-get install gfortran qt4-qmake flex bison 
$ sudo apt-get install libmysqlclient-dev mysql-client
Z
zhiru 已提交
56
```
J
jielin.xu 已提交
57 58 59 60 61 62

Verify the existence of `libmysqlclient_r.so`:

```shell
# Verify existence
$ locate libmysqlclient_r.so
Z
zhiru 已提交
63
```
G
groot 已提交
64

J
jielin.xu 已提交
65
If not, you need to create a symbolic link:
Z
zhiru 已提交
66

J
jielin.xu 已提交
67
```shell
68 69 70 71
# Locate libmysqlclient.so
$ sudo updatedb
$ locate libmysqlclient.so 

J
jielin.xu 已提交
72 73 74
# Create symbolic link
$ sudo ln -s /path/to/libmysqlclient.so /path/to/libmysqlclient_r.so
```
G
groot 已提交
75

J
jielin.xu 已提交
76
###### Step 2 Build
X
MS-154  
xj.lin 已提交
77

J
jielin.xu 已提交
78
```shell
S
starlord 已提交
79 80 81 82
$ cd [Milvus sourcecode path]/cpp
$ ./build.sh -t Debug
or 
$ ./build.sh -t Release
J
jielin.xu 已提交
83 84 85
```

When the build is completed, all the stuff that you need in order to run Milvus will be installed under `[Milvus root path]/cpp/milvus`.
Z
zhiru 已提交
86

J
jielin.xu 已提交
87 88
If you encounter the following error message,
`protocol https not supported or disabled in libcurl`
Z
zhiru 已提交
89

J
jielin.xu 已提交
90
please reinstall CMake with curl:
Z
zhiru 已提交
91

J
jielin.xu 已提交
92 93
1. Install curl development files:
   ```shell
J
jielin.xu 已提交
94 95
   CentOS 7:   
   $ yum install curl-devel
96
   Ubuntu 16.04 or 18.04: 
J
jielin.xu 已提交
97
   $ sudo apt-get install libcurl4-openssl-dev
Z
zhiru 已提交
98
   ```
J
jielin.xu 已提交
99 100 101 102 103 104

2. Install [CMake 3.14](https://github.com/Kitware/CMake/releases/download/v3.14.6/cmake-3.14.6.tar.gz): 
   ```shell
   $ ./bootstrap --system-curl 
   $ make 
   $ sudo make install
Z
zhiru 已提交
105 106
   ```

107
##### code format and linting
S
starlord 已提交
108
Install clang-format and clang-tidy
109 110 111
```shell
CentOS 7:   
$ yum install clang
S
starlord 已提交
112 113
Ubuntu 16.04: 
$ sudo apt-get install clang-tidy
114
$ sudo su
S
starlord 已提交
115
$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
116 117 118
$ apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
$ apt-get update
$ apt-get install clang-format-6.0
S
starlord 已提交
119 120
Ubuntu 18.04: 
$ sudo apt-get install clang-tidy clang-format
121 122

$ rm cmake_build/CMakeCache.txt
S
starlord 已提交
123
```  
S
starlord 已提交
124
Check code style
S
starlord 已提交
125
```shell
126 127
$ ./build.sh -l
```
S
starlord 已提交
128 129 130 131 132
To format the code
```shell
$ cd cmake_build
$ make clang-format
```
133

J
jielin.xu 已提交
134 135 136 137 138
##### Run unit test

```shell
$ ./build.sh -u
```
Z
zhiru 已提交
139

J
jielin.xu 已提交
140
##### Run code coverage
S
starlord 已提交
141
Install lcov
J
jielin.xu 已提交
142 143 144
```shell
CentOS 7:   
$ yum install lcov
145
Ubuntu 16.04 or 18.04: 
J
jielin.xu 已提交
146
$ sudo apt-get install lcov
S
starlord 已提交
147 148
``` 
```shell  
J
jielin.xu 已提交
149 150
$ ./build.sh -u -c
```
G
groot 已提交
151

J
jielin.xu 已提交
152
##### Launch Milvus server
G
groot 已提交
153

J
jielin.xu 已提交
154 155 156
```shell
$ cd [Milvus root path]/cpp/milvus
```
G
groot 已提交
157

J
jielin.xu 已提交
158
Add `lib/` directory to `LD_LIBRARY_PATH`
Z
zhiru 已提交
159 160

```
J
jielin.xu 已提交
161 162 163 164 165
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/milvus/lib
```

Then start Milvus server:

Z
zhiru 已提交
166
```
J
jielin.xu 已提交
167 168 169 170 171 172 173 174 175 176
$ cd scripts
$ ./start_server.sh
```

To stop Milvus server, run:

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

J
jielin.xu 已提交
177
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).
J
jielin.xu 已提交
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210

### 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
```

Create a new file `example.py`, and add [Python example code](https://github.com/milvus-io/pymilvus/blob/branch-0.3.1/examples/AdvancedExample.py) to it.

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]/cpp/milvus/bin
 $ ./sdk_simple
```

## Contribution guidelines

J
jielin.xu 已提交
211
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
jielin.xu 已提交
212

J
jielin.xu 已提交
213
We use [GitHub issues](https://github.com/milvus-io/milvus/issues) to track issues and bugs. For general questions and public discussions, please join our community.
J
jielin.xu 已提交
214 215 216

## Join the Milvus community

J
jielin.xu 已提交
217
To connect with other users and contributors, welcome to join our [slack channel](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk). 
J
jielin.xu 已提交
218 219 220

## Milvus Roadmap

J
jielin.xu 已提交
221
Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upcoming features.
J
jielin.xu 已提交
222 223 224

## Resources

J
jielin.xu 已提交
225
[Milvus official website](https://www.milvus.io)
J
jielin.xu 已提交
226 227 228 229 230 231 232

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

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

[Milvus CSDN](https://mp.csdn.net/mdeditor/100041006#)

J
jielin.xu 已提交
233
[Milvus roadmap](https://milvus.io/docs/en/roadmap/)
J
jielin.xu 已提交
234

Z
zhiru 已提交
235

J
jielin.xu 已提交
236
## License
J
jinhai 已提交
237

J
jielin.xu 已提交
238
[Apache 2.0 license](milvus-io/milvus/LICENSE.md)