From 2cc50d80a308d1b79cd7769a9fd6220d570b0d37 Mon Sep 17 00:00:00 2001 From: Yinzuo Jiang Date: Fri, 17 May 2024 14:53:37 +0800 Subject: [PATCH] fix: add openblas in install_deps.sh (#33065) Install openblas using apt or yum in scripts/install_deps.sh, update documentations and fix some typos related to build and installation. issue: #33056, #33066 Signed-off-by: Yinzuo Jiang --- DEVELOPMENT.md | 11 ++++++++--- README.md | 4 ++-- build/docker/builder/gpu/ubuntu20.04/Dockerfile | 2 +- scripts/README.md | 8 ++++++++ scripts/install_deps.sh | 4 ++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 12d92600e3..cb6493a9fa 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -195,7 +195,13 @@ To build the Milvus project, run the following command: $ make ``` -If this command succeed, you will now have an executable at `bin/milvus` off of your Milvus project directory. +If this command succeeds, you will now have an executable at `bin/milvus` in your Milvus project directory. + +If you want to run the `bin/milvus` executable on the host machine, you need to set `LD_LIBRARY_PATH` temporarily: + +```shell +$ LD_LIBRARY_PATH=./internal/core/output/lib:lib:$LD_LIBRARY_PATH ./bin/milvus +``` If you want to update proto file before `make`, we can use the following command: @@ -500,7 +506,6 @@ $ ./build/build_image.sh // build milvus latest docker image $ docker images // check if milvus latest image is ready REPOSITORY TAG IMAGE ID CREATED SIZE milvusdb/milvus latest 63c62ff7c1b7 52 minutes ago 570MB -$ install with docker compose ``` ## GitHub Flow @@ -602,4 +607,4 @@ A: Reinstall llvm@15 brew reinstall llvm@15 export LDFLAGS="-L/opt/homebrew/opt/llvm@15/lib" export CPPFLAGS="-I/opt/homebrew/opt/llvm@15/include" -``` \ No newline at end of file +``` diff --git a/README.md b/README.md index e280d2db75..e025787414 100644 --- a/README.md +++ b/README.md @@ -60,9 +60,9 @@ Zilliz Cloud is a fully managed service on cloud and the simplest way to deploy ### Install Milvus -- [Standalone Quick Start Guide](https://milvus.io/docs/v2.0.x/install_standalone-docker.md) +- [Standalone Quick Start Guide](https://milvus.io/docs/install_standalone-docker.md) -- [Cluster Quick Start Guide](https://milvus.io/docs/v2.0.x/install_cluster-docker.md) +- [Cluster Quick Start Guide](https://milvus.io/docs/install_cluster-docker.md) - [Advanced Deployment](https://github.com/milvus-io/milvus/wiki) diff --git a/build/docker/builder/gpu/ubuntu20.04/Dockerfile b/build/docker/builder/gpu/ubuntu20.04/Dockerfile index a9fc65f3a8..87e70b64d0 100644 --- a/build/docker/builder/gpu/ubuntu20.04/Dockerfile +++ b/build/docker/builder/gpu/ubuntu20.04/Dockerfile @@ -34,7 +34,7 @@ RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest -# Instal openblas +# Install openblas # RUN wget https://github.com/xianyi/OpenBLAS/archive/v0.3.21.tar.gz && \ # tar zxvf v0.3.21.tar.gz && cd OpenBLAS-0.3.21 && \ # make NO_STATIC=1 NO_LAPACK=1 NO_LAPACKE=1 NO_CBLAS=1 NO_AFFINITY=1 USE_OPENMP=1 \ diff --git a/scripts/README.md b/scripts/README.md index f8c1e787f9..838db6fd5e 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -23,6 +23,14 @@ $ go get github.com/golang/protobuf/protoc-gen-go@v1.3.2 Install OpenBlas library +install using apt + +```shell +sudo apt install -y libopenblas-dev +``` + +or build from source code + ```shell $ wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \ $ tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \ diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 608262f425..8ae371aa2a 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -22,7 +22,7 @@ function install_linux_deps() { sudo apt install -y wget curl ca-certificates gnupg2 \ g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \ clang-format-10 clang-tidy-10 lcov libtool m4 autoconf automake python3 python3-pip \ - pkg-config uuid-dev libaio-dev libgoogle-perftools-dev + pkg-config uuid-dev libaio-dev libopenblas-dev libgoogle-perftools-dev sudo pip3 install conan==1.61.0 elif [[ -x "$(command -v yum)" ]]; then @@ -31,7 +31,7 @@ function install_linux_deps() { sudo yum install -y wget curl which \ git make automake python3-devel \ devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran devtoolset-11-libatomic-devel \ - llvm-toolset-11.0-clang llvm-toolset-11.0-clang-tools-extra \ + llvm-toolset-11.0-clang llvm-toolset-11.0-clang-tools-extra openblas-devel \ libaio libuuid-devel zip unzip \ ccache lcov libtool m4 autoconf automake