From 8d3373382e32bf6267d508ee6254e7fcd8b987f9 Mon Sep 17 00:00:00 2001 From: Xiaohai Xu Date: Fri, 21 Feb 2020 21:19:55 +0800 Subject: [PATCH] Update INSTALL.md (#1283) * Update INSTALL.md Signed-off-by: sahuang * Update INSTALL.md Signed-off-by: sahuang * Update INSTALL.md update shell script Signed-off-by: sahuang * Update INSTALL.md Signed-off-by: sahuang --- INSTALL.md | 62 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 04f3b0b177..030da0624f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,19 +3,19 @@ - [Build from source](#build-from-source) - - [Requirements](#requirements) - - [Compilation](#compilation) - - [Launch Milvus server](#launch-milvus-server) + - [Requirements](#requirements) + - [Compilation](#compilation) + - [Launch Milvus server](#launch-milvus-server) - [Compile Milvus on Docker](#compile-milvus-on-docker) - - [Step 1 Pull Milvus Docker images](#step-1-pull-milvus-docker-images) - - [Step 2 Start the Docker container](#step-2-start-the-docker-container) - - [Step 3 Download Milvus source code](#step-3-download-milvus-source-code) - - [Step 4 Compile Milvus in the container](#step-4-compile-milvus-in-the-container) + - [Step 1 Pull Milvus Docker images](#step-1-pull-milvus-docker-images) + - [Step 2 Start the Docker container](#step-2-start-the-docker-container) + - [Step 3 Download Milvus source code](#step-3-download-milvus-source-code) + - [Step 4 Compile Milvus in the container](#step-4-compile-milvus-in-the-container) - [Troubleshooting](#troubleshooting) - - [Error message: `protocol https not supported or disabled in libcurl`](#error-message-protocol-https-not-supported-or-disabled-in-libcurl) - - [Error message: `internal compiler error`](#error-message-internal-compiler-error) - - [Error message: `error while loading shared libraries: libmysqlpp.so.3`](#error-message-error-while-loading-shared-libraries-libmysqlppso3) - - [CMake version is not supported](#cmake-version-is-not-supported) + - [Error message: `protocol https not supported or disabled in libcurl`](#error-message-protocol-https-not-supported-or-disabled-in-libcurl) + - [Error message: `internal compiler error`](#error-message-internal-compiler-error) + - [Error message: `error while loading shared libraries: libmysqlpp.so.3`](#error-message-error-while-loading-shared-libraries-libmysqlppso3) + - [CMake version is not supported](#cmake-version-is-not-supported) @@ -23,10 +23,11 @@ ### Requirements -- Ubuntu 18.04 or higher -- CentOS 7 +- Operating system + - Ubuntu 18.04 or higher + - CentOS 7 -If your operating system does not meet the requirements, we recommend that you pull a Docker image of [Ubuntu 18.04](https://docs.docker.com/install/linux/docker-ce/ubuntu/) or [CentOS 7](https://docs.docker.com/install/linux/docker-ce/centos/) as your compilation environment. + If your operating system does not meet the requirements, we recommend that you pull a Docker image of [Ubuntu 18.04](https://docs.docker.com/install/linux/docker-ce/ubuntu/) or [CentOS 7](https://docs.docker.com/install/linux/docker-ce/centos/) as your compilation environment. - GCC 7.0 or higher to support C++ 17 - CMake 3.12 or higher @@ -40,33 +41,33 @@ For GPU-enabled version, you will also need: #### Step 1 Install dependencies +##### Install in Ubuntu + ```shell $ cd [Milvus root path]/core $ ./ubuntu_build_deps.sh ``` -#### Step 2 Build +##### Install in CentOS -##### Build in Ubuntu +```shell +$ cd [Milvus root path]/core +$ ./centos7_build_deps.sh +``` + +#### Step 2 Build ```shell $ cd [Milvus root path]/core $ ./build.sh -t Debug ``` -or +or ```shell $ ./build.sh -t Release ``` -##### Build in CentOS - -```shell -$ cd [Milvus root path]/core -$ ./centos7_build_deps.sh -``` - By default, it will build CPU-only version. To build GPU version, add `-g` option. ```shell @@ -79,7 +80,7 @@ If you want to know the complete build options, run the following command. $./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`. +When the build is completed, everything that you need in order to run Milvus will be installed under `[Milvus root path]/core/milvus`. ### Launch Milvus server @@ -141,6 +142,7 @@ To enter the container: ```shell $ docker exec -it [container_id] bash ``` + ### Step 3 Download Milvus source code Download latest Milvus source code: @@ -195,12 +197,18 @@ Follow the steps below to solve this problem: ### Error message: `internal compiler error` -Try increasing the memory allocated to docker. +Try increasing the memory allocated to Docker. If this doesn't work, you can reduce the number of threads in CMake build in `[Milvus root path]/core/build.sh`. + +```shell +make -j 8 install || exit 1 # The default number of threads is 8. +``` + +Note: You might also need to configure CMake build for faiss in `[Milvus root path]/core/src/index/thirdparty/faiss`. ### Error message: `error while loading shared libraries: libmysqlpp.so.3` Follow the steps below to solve this problem: - + 1. Check whether `libmysqlpp.so.3` is correctly installed. 2. If `libmysqlpp.so.3` is installed, check whether it is added to `LD_LIBRARY_PATH`.