-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
162 lines (118 loc) · 5.97 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Copyright © 2024 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
.PHONY: build-all download-models clean-models build-profile-launcher update-submodules build-ovms_server
.PHONY: download-sample-media
.PHONY: build-gst run-gst down-gst
.PHONY: build-grpc_python list-grpc-python-model-names run-grpc_python down-grpc_python
.PHONY: build-capi_yolov5 run-capi_yolov5 down-capi_yolov5
.PHONY: build-capi_yolov5_ensemble run-capi_yolov5_ensemble down-capi_yolov5_ensemble
.PHONY: build-capi_face_detection run-capi_face_detection down-capi_face_detection
.PHONY: build-capi_yolov8_ensemble run-capi_yolov8_ensemble down-capi_yolov8_ensemble
.PHONY: build-all-capis
.PHONY: build-demos down-demos-all
.PHONY: run-demo-classification down-demo-classification run-demo-instance-segmentation down-demo-instance-segmentation run-demo-object-detection down-demo-object-detection
.PHONY: clean-results
.PHONY: build-grpc-go run-grpc-go down-grpc-go
.PHONY: run-smoke-tests
.PHONY: render
USECASES= \
demos \
dlstreamer \
grpc_go \
grpc_python \
gst_capi \
ovms_server
.PHONY: $(USECASES)
build-all:
for repo in ${USECASES}; do \
echo use-cases/$$repo; \
cd use-cases/$$repo; \
make build || exit 1; \
cd ../..; \
done
download-models:
./models-downloader/downloadOVMSModels.sh
clean-models:
@find ./models/ -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;
clean-results:
@find ./results/ -maxdepth 1 -type f ! -name "result.txt" -exec sudo rm -r {} \;
build-profile-launcher:
@cd ./core-services && $(MAKE) build-profile-launcher
build-ovms_server:
@cd ./use-cases/ovms_server && $(MAKE) build
update-submodules:
@git submodule update --init --recursive
@git submodule update --remote --merge
download-sample-media:
@cd ./performance-tools/benchmark-scripts && ./download_sample_videos.sh
build-gst:
@cd ./use-cases/dlstreamer && $(MAKE) --no-print-directory build
prepare-inputs: update-submodules download-models download-sample-media render
run-gst: prepare-inputs
@cd ./use-cases/dlstreamer && $(MAKE) --no-print-directory run
down-gst:
@cd ./use-cases/dlstreamer && $(MAKE) --no-print-directory down
build-grpc_python: build-ovms_server
@cd ./use-cases/grpc_python && $(MAKE) --no-print-directory build
list-grpc-python-model-names:
@cd ./use-cases/grpc_python && $(MAKE) --no-print-directory model-names
run-grpc_python: prepare-inputs list-grpc-python-model-names
@cd ./use-cases/grpc_python && $(MAKE) --no-print-directory run
down-grpc_python:
@cd ./use-cases/grpc_python && $(MAKE) --no-print-directory down
build-capi_yolov5:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory build_capi_yolov5
run-capi_yolov5: prepare-inputs
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov5.yml run_capi_yolov5
down-capi_yolov5:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov5.yml down_capi_yolov5
build-capi_yolov5_ensemble:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory build_capi_yolov5_ensemble
run-capi_yolov5_ensemble: prepare-inputs
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov5_ensemble.yml run_capi_yolov5_ensemble
down-capi_yolov5_ensemble:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov5_ensemble.yml down_capi_yolov5_ensemble
build-capi_face_detection:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory build_face_detection
run-capi_face_detection: prepare-inputs
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_face_detection.yml run_capi_face_detection
down-capi_face_detection:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_face_detection.yml down_capi_face_detection
build-capi_yolov8_ensemble:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory build_capi_yolov8_ensemble
run-capi_yolov8_ensemble: prepare-inputs
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov8_ensemble.yml run_capi_yolov8_ensemble
down-capi_yolov8_ensemble:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_capi_yolov8_ensemble.yml down_capi_yolov8_ensemble
build-all-capis:
@cd ./use-cases/gst_capi && $(MAKE) --no-print-directory build
build-demos:
@cd ./use-cases/demos && $(MAKE) --no-print-directory build
run-demo-classification: prepare-inputs
@cd ./use-cases/demos && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_demo_classification.yml run_classification
down-demo-classification:
@cd ./use-cases/demos && $(MAKE) --no-print-directory down_classification
run-demo-instance-segmentation: prepare-inputs
@cd ./use-cases/demos && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_demo_instance_segmentation.yml run_instance_segmentation
down-demo-instance-segmentation:
@cd ./use-cases/demos && $(MAKE) --no-print-directory down_instance_segmentation
run-demo-object-detection: prepare-inputs
@cd ./use-cases/demos && $(MAKE) --no-print-directory DOCKER_COMPOSE=docker-compose_demo_object_detection.yml run_object_detection
down-demo-object-detection:
@cd ./use-cases/demos && $(MAKE) --no-print-directory down_object_detection
down-demos-all:
@cd ./use-cases/demos && $(MAKE) --no-print-directory compose_down_all
build-grpc-go: build-ovms_server
@cd ./use-cases/grpc_go && $(MAKE) --no-print-directory build
run-grpc-go: prepare-inputs
@cd ./use-cases/grpc_go && $(MAKE) --no-print-directory run
down-grpc-go:
@cd ./use-cases/grpc_go && $(MAKE) --no-print-directory down
run-smoke-tests:
@echo "Running smoke tests for retail use cases"
@cd ./smoke-tests && $(MAKE) --no-print-directory run > smoke_tests_output.log
@echo "results of smoke tests recorded in the file smoke_tests_output.log"
@grep -i "Failed" ./smoke-tests/smoke_tests_output.log || true
@grep "===" ./smoke-tests/smoke_tests_output.log || true
render:
xhost +local:docker