-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
66 lines (49 loc) · 1.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
GOGOPROTO_SRC_DIR=./idl/gogoproto/v1
GOGOPROTO_OUT_DIR=./gen/gogoprotoc/v1
PROTO_SRC_DIR=./idl/proto/v3
PROTO_OUT_DIR=./gen/protoc/v3
COMPILE_VERSION=V3
start:
- go run cmd/root/main.go -mode=root
start-edge:
- go run cmd/root/main.go -mode=edge
docker-build-bin:
- env GOOS=linux go build -o ./bin/ cmd/root/main.go
compile-gogoproto:
@echo "Compiling proto files..."
mkdir -p $(GOGOPROTO_OUT_DIR)
find $(GOGOPROTO_SRC_DIR) -name "*.proto" | while read PROTO_FILE; do \
FILE_NAME=$$(basename $$PROTO_FILE .proto); \
mkdir -p "$(GOGOPROTO_OUT_DIR)/$${FILE_NAME}$(COMPILE_VERSION)"; \
protoc -I$(GOGOPROTO_SRC_DIR) --gofast_out=plugins=grpc,paths=source_relative:"$(GOGOPROTO_OUT_DIR)/$${FILE_NAME}$(COMPILE_VERSION)" "$$PROTO_FILE"; \
done
compile-proto-py:
mkdir -p $(PROTO_OUT_DIR)
python -m grpc_tools.protoc -I./idl/proto/v2 --proto_path=./ --python_out=./gen/protoc/v2 --pyi_out=./gen/protoc/v2 --grpc_python_out=./gen/protoc/v2 ./idl/proto/v2/*.proto
compile-proto:
- protoc --go-grpc_opt=require_unimplemented_servers=false --go-grpc_out=$(PROTO_OUT_DIR) \
--proto_path=./ $(PROTO_SRC_DIR)/*.proto && protoc --go_out=$(PROTO_OUT_DIR) --proto_path=./ $(PROTO_SRC_DIR)/*.proto
clean:
@echo "Cleaning up generated files..."
rm -rf $(PROTO_OUT_DIR)
add-license:
- go-licenser -license ASL2 -licensor sjy-dv
edge-docker:
- docker build --file edge.dockerfile -t nnv:edge .
simple-docker:
- docker build --file simple.dockerfile -t nnv:simple .
- docker run nnv:simple -p 50051:50051 -d
simple2-docker:
- docker build --file simple.v2.dockerfile -t nnv:cgo .
test:
- go test -v --count=1 ./pkg/sharding
# - go test -v --count=1 ./storage
# - go test -v --count=1 ./pkg/flat
# - go test -v --count=1 ./pkg/hnsw
compress-float:
- go test -v --count=1 ./pkg/compresshelper
bench-milvus-boot:
- docker-compose -f ./benchmark/milvus.docker.compose.yaml -p benchmark-milvus up
e2e-test:
@echo "e2e Test [HNSW Commit & Load]"
- go run e2e/e2e_hnsw.go