Clean unnecessary deps to make milvus (#19711)

Signed-off-by: Jenny Li <jing.li@zilliz.com>

Signed-off-by: Jenny Li <jing.li@zilliz.com>
This commit is contained in:
Jenny Li 2022-10-12 14:33:23 +08:00 committed by GitHub
parent a8a074162f
commit 9aa307d851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 17 deletions

View File

@ -144,4 +144,4 @@ jobs:
CCACHE_DIR: ${{ github.workspace }}/.ccache
run: |
go version
mingw32-make verifiers build-go
mingw32-make verifiers milvus

View File

@ -126,7 +126,7 @@ Milvus depends on etcd, Pulsar and MinIO. Using Docker Compose to manage these i
To build the Milvus project, run the following command:
```shell
$ make all
$ make milvus
```
If this command succeed, you will now have an executable at `bin/milvus` off of your Milvus project directory.

View File

@ -22,7 +22,17 @@ ARCH := $(shell arch)
mode = Release
disk_index = OFF
all: build-cpp build-go
milvus: build-cpp print-build-info
ifeq ($(RELEASE), TRUE)
@echo "Update milvus/api version ..."
@(env bash $(PWD)/scripts/update_api_version.sh)
endif
@echo "Building Milvus ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
GO111MODULE=on $(GO) build -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)'" \
${APPLE_SILICON_FLAG} -o $(INSTALL_PATH)/milvus $(PWD)/cmd/main.go 1>/dev/null
get-build-deps:
@(env bash $(PWD)/scripts/install_deps.sh)
@ -102,16 +112,7 @@ print-build-info:
@echo "Git Commit: $(GIT_COMMIT)"
@echo "Go Version: $(GO_VERSION)"
milvus: build-cpp print-build-info
ifeq ($(RELEASE), TRUE)
@echo "Update milvus/api version ..."
@(env bash $(PWD)/scripts/update_api_version.sh)
endif
@echo "Building Milvus ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
GO111MODULE=on $(GO) build -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)'" \
${APPLE_SILICON_FLAG} -o $(INSTALL_PATH)/milvus $(PWD)/cmd/main.go 1>/dev/null
embd-milvus: build-cpp-embd print-build-info
@echo "Building **Embedded** Milvus ..."
@ -120,7 +121,7 @@ embd-milvus: build-cpp-embd print-build-info
GO111MODULE=on $(GO) build -ldflags="-r /tmp/milvus/lib/ -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)'" \
${APPLE_SILICON_FLAG} -buildmode=c-shared -o $(INSTALL_PATH)/embd-milvus.so $(PWD)/pkg/embedded/embedded.go 1>/dev/null
build-go: milvus
build-cpp:
@echo "Building Milvus cpp library ..."
@ -233,7 +234,7 @@ docker: install
./build/build_image.sh
# Build each component and install binary to $GOPATH/bin.
install: all
install: milvus
@echo "Installing binary to './bin'"
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/milvus $(GOPATH)/bin/milvus
@mkdir -p $(LIBRARY_PATH) && cp -r -P $(PWD)/internal/core/output/lib/*.so* $(LIBRARY_PATH)

View File

@ -115,7 +115,7 @@ docker exec -ti milvus_builder_1 bash
Compile the project and run unit test, see details at the [DEVELOPMENT.md](../DEVELOPMENT.md)
```shell
make all
make milvus
```
```shell

View File

@ -46,7 +46,7 @@ $ make verifiers
Compile milvus
```shell
$ make all
$ make milvus
```
## Install docker-compose