mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 17:48:29 +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
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
run: |
|
run: |
|
||||||
go version
|
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:
|
To build the Milvus project, run the following command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ make all
|
$ make milvus
|
||||||
```
|
```
|
||||||
|
|
||||||
If this command succeed, you will now have an executable at `bin/milvus` off of your Milvus project directory.
|
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
|
mode = Release
|
||||||
disk_index = OFF
|
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:
|
get-build-deps:
|
||||||
@(env bash $(PWD)/scripts/install_deps.sh)
|
@(env bash $(PWD)/scripts/install_deps.sh)
|
||||||
@ -102,16 +112,7 @@ print-build-info:
|
|||||||
@echo "Git Commit: $(GIT_COMMIT)"
|
@echo "Git Commit: $(GIT_COMMIT)"
|
||||||
@echo "Go Version: $(GO_VERSION)"
|
@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
|
embd-milvus: build-cpp-embd print-build-info
|
||||||
@echo "Building **Embedded** Milvus ..."
|
@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)'" \
|
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
|
${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:
|
build-cpp:
|
||||||
@echo "Building Milvus cpp library ..."
|
@echo "Building Milvus cpp library ..."
|
||||||
@ -233,7 +234,7 @@ docker: install
|
|||||||
./build/build_image.sh
|
./build/build_image.sh
|
||||||
|
|
||||||
# Build each component and install binary to $GOPATH/bin.
|
# Build each component and install binary to $GOPATH/bin.
|
||||||
install: all
|
install: milvus
|
||||||
@echo "Installing binary to './bin'"
|
@echo "Installing binary to './bin'"
|
||||||
@mkdir -p $(GOPATH)/bin && cp -f $(PWD)/bin/milvus $(GOPATH)/bin/milvus
|
@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)
|
@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)
|
Compile the project and run unit test, see details at the [DEVELOPMENT.md](../DEVELOPMENT.md)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
make all
|
make milvus
|
||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $ make verifiers
|
|||||||
Compile milvus
|
Compile milvus
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ make all
|
$ make milvus
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install docker-compose
|
## Install docker-compose
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user