Commit bd48ebc4 authored by jinhai's avatar jinhai
Browse files

Merge branch '0.5.0' into '0.5.0'

0.5.0

See merge request megasearch/milvus!749

Former-commit-id: f7182d1e73fec056b344aa8f0b11ffe924352638
parents 426e515b e6a11207
Loading
Loading
Loading
Loading
+21 −4
Original line number Diff line number Diff line
@@ -4,9 +4,7 @@ First of all, thanks for taking the time to contribute to Milvus! It's people li

The following are a set of guidelines for contributing to Milvus. Following these guidelines helps contributing to this project easy and transparent. These are mostly guideline, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

As for everything else in the project, the contributions to Milvus are governed by our [Code of Conduct](CODE OF CONDUCT.md).

TOC
As for everything else in the project, the contributions to Milvus are governed by our [Code of Conduct](CODE_OF_CONDUCT.md).

## Contribution Checklist

@@ -28,10 +26,29 @@ Contributions to Milvus fall into the following categories.

### Contributing code

If you have improvements to Milvus, send us your pull requests! For those just getting started, GitHub has a [how-to](https://help.github.com/en/articles/about-pull-requests).
If you have improvements to Milvus, send us your pull requests! For those just getting started, see [GitHub workflow](#github-workflow).

The Milvus team members will review your pull requests, and once it is accepted, it will be given a `ready to merge` label. This means we are working on submitting your pull request to the internal repository. After the change has been submitted internally, your pull request will be merged automatically on GitHub.

### GitHub workflow

Please create a new branch from an up-to-date master on your fork.

1. Fork the repository on GitHub.
2. Clone your fork to your local machine with `git clone git@github.com:<yourname>/milvus-io/milvus.git`.
3. Create a branch with `git checkout -b my-topic-branch`.
4. Make your changes, commit, then push to to GitHub with `git push --set-upstream origin my-topic-branch`.
5. Visit GitHub and make your pull request.

If you have an existing local repository, please update it before you start, to minimize the chance of merge conflicts.

```shell
git remote add upstream git@github.com:milvus-io/milvus.git
git checkout master
git pull upstream master
git checkout -b my-topic-branch
```

### General guidelines

Before sending your pull requests for review, make sure your changes are consistent with the guidelines and follow the Milvus coding style.
+37 −78
Original line number Diff line number Diff line
![Milvuslogo](https://milvus.io/docs/assets/milvus_logo.png)

- [Slack Community](https://join.slack.com/t/milvusio/shared_invite/enQtNzY1OTQ0NDI3NjMzLWNmYmM1NmNjOTQ5MGI5NDhhYmRhMGU5M2NhNzhhMDMzY2MzNDdlYjM5ODQ5MmE3ODFlYzU3YjJkNmVlNDQ2ZTk)
- [Blog](https://www.milvus.io/blog/)
- [Twitter](https://twitter.com/milvus_io)

# Welcome to Milvus

@@ -32,48 +35,29 @@ Keep up-to-date with newest releases and latest updates by reading Milvus [relea

## Get started

### Install and start Milvus server

#### Use Docker
### Install using docker

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

#### Use source code
### Build from source

##### Compilation
#### Software requirements

###### Step 1 Install necessary tools
- Ubuntu 18.04 or higher
- CMake 3.14 or higher
- CUDA 10.0 or higher
- NVIDIA driver 418 or higher

```shell
# Install tools
Centos7 : 
$ yum install gfortran qt4 flex bison 
$ yum install mysql-devel mysql
#### Compilation

Ubuntu 16.04 or 18.04: 
$ sudo apt-get install gfortran qt4-qmake flex bison 
$ sudo apt-get install libmysqlclient-dev mysql-client
```

Verify the existence of `libmysqlclient_r.so`:
##### Step 1 Install dependencies

```shell
# Verify existence
$ locate libmysqlclient_r.so
```

If not, you need to create a symbolic link:

```shell
# Locate libmysqlclient.so
$ sudo updatedb
$ locate libmysqlclient.so 

# Create symbolic link
$ sudo ln -s /path/to/libmysqlclient.so /path/to/libmysqlclient_r.so
$ cd [Milvus sourcecode path]/core
./ubuntu_build_deps.sh
```

###### Step 2 Build
##### Step 2 Build

```shell
$ cd [Milvus sourcecode path]/core
@@ -84,41 +68,11 @@ $ ./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`.

If you encounter the following error message,
`protocol https not supported or disabled in libcurl`

please reinstall CMake with curl:
#### Code format and linting

1. Install curl development files:
Install clang-format
```shell
   CentOS 7:   
   $ yum install curl-devel
   Ubuntu 16.04 or 18.04: 
   $ sudo apt-get install libcurl4-openssl-dev
   ```

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

##### code format and linting
Install clang-format and clang-tidy
```shell
CentOS 7:   
$ yum install clang
Ubuntu 16.04: 
$ sudo apt-get install clang-tidy
$ sudo su
$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
$ 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
Ubuntu 18.04: 
$ sudo apt-get install clang-tidy clang-format

$ sudo apt-get install clang-format
$ rm cmake_build/CMakeCache.txt
```
Check code style
@@ -131,34 +85,39 @@ $ cd cmake_build
$ make clang-format
```

##### Run unit test
#### Run unit test

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

##### Run code coverage
#### Run code coverage

Install lcov
```shell
CentOS 7:   
$ yum install lcov
Ubuntu 16.04 or 18.04: 
$ sudo apt-get install lcov
```
```shell  
$ ./build.sh -u -c
```
Run mysql docker
Run MySQL docker
```shell 
docker pull mysql:latest
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
```
Run code coverage

```shell  
$ ./coverage.sh -u root -p 123456 -t 127.0.0.1
```

##### Launch Milvus server
Or start your own MySQL server, and then run code coverage

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

#### Launch Milvus server

```shell
$ cd [Milvus root path]/core/milvus
@@ -198,7 +157,7 @@ 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.
Create a new file `example.py`, and add [Python example code](https://github.com/milvus-io/pymilvus/blob/master/examples/AdvancedExample.py) to it.

Run the example code.

@@ -217,9 +176,9 @@ $ python3 example.py

## Contribution guidelines

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

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.
We use [GitHub issues](https://github.com/milvus-io/milvus/issues/new) to track issues and bugs. For general questions and public discussions, please join our community.

## Join the Milvus community

@@ -233,7 +192,7 @@ Please read our [roadmap](https://milvus.io/docs/en/roadmap/) to learn about upc

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

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

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

+3 −3
Original line number Diff line number Diff line
@@ -96,9 +96,9 @@ set(prometheus_lib
        )

set(boost_lib
        boost_system
        boost_filesystem
        boost_serialization
        libboost_system.a
        libboost_filesystem.a
        libboost_serialization.a
        )

set(cuda_lib
+2 −2
Original line number Diff line number Diff line
@@ -92,8 +92,8 @@ set(common_files

set(unittest_libs
        sqlite
        boost_system_static
        boost_filesystem_static
        libboost_system.a
        libboost_filesystem.a
        lz4
        mysqlpp
        yaml-cpp