mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
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:
parent
a8a074162f
commit
9aa307d851
2
.github/workflows/code-checker.yaml
vendored
2
.github/workflows/code-checker.yaml
vendored
@ -144,4 +144,4 @@ jobs:
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
run: |
|
||||
go version
|
||||
mingw32-make verifiers build-go
|
||||
mingw32-make verifiers milvus
|
||||
|
@ -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.
|
||||
|
27
Makefile
27
Makefile
@ -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)
|
||||
|
@ -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
|
||||
|
@ -46,7 +46,7 @@ $ make verifiers
|
||||
Compile milvus
|
||||
|
||||
```shell
|
||||
$ make all
|
||||
$ make milvus
|
||||
```
|
||||
|
||||
## Install docker-compose
|
||||
|
Loading…
Reference in New Issue
Block a user