mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
Add docker compilation images
This commit is contained in:
parent
01cd2b1e02
commit
9a17db48bc
88
install.md
88
install.md
@ -1,6 +1,11 @@
|
||||
# Install Milvus from Source Code
|
||||
|
||||
## Software requirements
|
||||
- [Build from source](https://github.com/jielinxu/milvus/edit/0.6.0/install.md#build-from-source)
|
||||
- [Compile Milvus on Docker](https://github.com/jielinxu/milvus/edit/0.6.0/install.md#compile-milvus-on-docker)
|
||||
|
||||
## Build from source
|
||||
|
||||
### Requirements
|
||||
|
||||
- Ubuntu 18.04 or higher
|
||||
|
||||
@ -8,21 +13,21 @@
|
||||
|
||||
- CMake 3.12 or higher
|
||||
|
||||
##### For GPU version, you will also need:
|
||||
##### For GPU-enabled version, you will also need:
|
||||
|
||||
- CUDA 10.0 or higher
|
||||
- NVIDIA driver 418 or higher
|
||||
|
||||
## Compilation
|
||||
### Compilation
|
||||
|
||||
### Step 1 Install dependencies
|
||||
#### Step 1 Install dependencies
|
||||
|
||||
```shell
|
||||
$ cd [Milvus root path]/core
|
||||
$ ./ubuntu_build_deps.sh
|
||||
```
|
||||
|
||||
### Step 2 Build
|
||||
#### Step 2 Build
|
||||
|
||||
```shell
|
||||
$ cd [Milvus root path]/core
|
||||
@ -31,7 +36,7 @@ or
|
||||
$ ./build.sh -t Release
|
||||
```
|
||||
|
||||
By default, it will build CPU version. To build GPU version, add `-g` option
|
||||
By default, it will build CPU-only version. To build GPU version, add `-g` option
|
||||
```shell
|
||||
$ ./build.sh -g
|
||||
```
|
||||
@ -43,7 +48,7 @@ $./build.sh -h
|
||||
|
||||
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`.
|
||||
|
||||
## Launch Milvus server
|
||||
### Launch Milvus server
|
||||
|
||||
```shell
|
||||
$ cd [Milvus root path]/core/milvus
|
||||
@ -68,6 +73,75 @@ To stop Milvus server, run:
|
||||
$ ./stop_server.sh
|
||||
```
|
||||
|
||||
## Compile Milvus on Docker
|
||||
|
||||
With this dockerfile, you should be able to compile CPU-only or GPU-enabled Milvus on any Linux platform that run Docker. To build a GPU-enabled Milvus, you neeed to install [NVIDIA Docker](https://github.com/NVIDIA/nvidia-docker/) first.
|
||||
|
||||
### Step 1 Pull Milvus Docker images
|
||||
|
||||
Pull CPU-only image:
|
||||
|
||||
```shell
|
||||
$ Docker pull milvusdb/milvus-cpu-build-env:v0.6.0-ubuntu18.04
|
||||
```
|
||||
|
||||
Pull GPU-enabled image:
|
||||
|
||||
```shell
|
||||
$ Docker pull milvusdb/milvus-gpu-build-env:v0.6.0-ubuntu18.04
|
||||
```
|
||||
### Step 2 Start the Docker container
|
||||
|
||||
Start a CPU-only container:
|
||||
|
||||
```shell
|
||||
$ Docker run -it -p 19530:19530 -d milvusdb/milvus-cpu-build-env:v0.6.0-ubuntu18.04
|
||||
```
|
||||
|
||||
Start a GPU container:
|
||||
|
||||
```shell
|
||||
$ Docker run — runtime=nvidia -it -p 19530:19530 -d milvusdb/milvus-gpu-build-env:v0.6.0-ubuntu18.04
|
||||
```
|
||||
To enter the container:
|
||||
|
||||
```shell
|
||||
$ Docker exec -it [container_id] bash
|
||||
```
|
||||
### Step 3 Download Milvus source code and compile it in the container
|
||||
|
||||
Download Milvus source code:
|
||||
|
||||
```shell
|
||||
$ cd /home
|
||||
$ wget https://github.com/milvus-io/milvus/archive/0.6.0.zip
|
||||
```
|
||||
|
||||
Unzip the source package:
|
||||
|
||||
```shell
|
||||
$ Apt-get update
|
||||
$ Apt-get install unzip
|
||||
$ unzip ./0.6.0.zip
|
||||
```
|
||||
|
||||
The source code is extracted into a folder called `milvus-0.6.0`.
|
||||
|
||||
If you are using a CPU-only image, compile it like this:
|
||||
```shell
|
||||
$ ./build.sh -t Release
|
||||
```
|
||||
|
||||
For GPU-enabled image, you need to add a `-g` parameter:
|
||||
```shell
|
||||
$ ./build.sh -g -t Release
|
||||
```
|
||||
|
||||
Then start Milvus server:
|
||||
```shell
|
||||
$ ./start_server.sh
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
1. If you encounter the following error when compiling:
|
||||
`protocol https not supported or disabled in libcurl`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user