-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
137 lines (104 loc) · 4.05 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
# Copyright © 2024 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
.PHONY: build build-realsense run down
.PHONY: build-telegraf run-telegraf run-portainer clean-all clean-results clean-telegraf clean-models down-portainer
.PHONY: download-models clean-test run-demo run-headless
MKDOCS_IMAGE ?= asc-mkdocs
PIPELINE_COUNT ?= 1
TARGET_FPS ?= 14.95
DOCKER_COMPOSE ?= docker-compose.yml
RESULTS_DIR ?= $(PWD)/results
RETAIL_USE_CASE_ROOT ?= $(PWD)
download-models:
./download_models/downloadModels.sh
download-sample-videos:
cd performance-tools/benchmark-scripts && ./download_sample_videos.sh
clean-models:
@find ./models/ -mindepth 1 -maxdepth 1 -type d -exec sudo rm -r {} \;
run-smoke-tests: | download-models update-submodules download-sample-videos
@echo "Running smoke tests for OVMS profiles"
@./smoke_test.sh > smoke_tests_output.log
@echo "results of smoke tests recorded in the file smoke_tests_output.log"
@grep "Failed" ./smoke_tests_output.log || true
@grep "===" ./smoke_tests_output.log || true
update-submodules:
@git submodule update --init --recursive
@git submodule update --remote --merge
build:
docker build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --target build-default -t dlstreamer:dev -f src/Dockerfile src/
build-realsense:
docker build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --target build-realsense -t dlstreamer:realsense -f src/Dockerfile src/
build-pipeline-server: | download-models update-submodules download-sample-videos
docker build -t dlstreamer:pipeline-server -f src/pipeline-server/Dockerfile.pipeline-server src/pipeline-server
run:
docker compose -f src/$(DOCKER_COMPOSE) up -d
run-render-mode:
xhost +local:docker
RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE) up -d
down:
docker compose -f src/$(DOCKER_COMPOSE) down
run-demo: | download-models update-submodules download-sample-videos
@echo "Building automated self checkout app"
$(MAKE) build
@echo Running automated self checkout pipeline
$(MAKE) run-render-mode
run-headless: | download-models update-submodules download-sample-videos
@echo "Building automated self checkout app"
$(MAKE) build
@echo Running automated self checkout pipeline
$(MAKE) run
run-pipeline-server: | build-pipeline-server
RETAIL_USE_CASE_ROOT=$(RETAIL_USE_CASE_ROOT) docker compose -f src/pipeline-server/docker-compose.pipeline-server.yml up -d
down-pipeline-server:
docker compose -f src/pipeline-server/docker-compose.pipeline-server.yml down
build-benchmark:
cd performance-tools && $(MAKE) build-benchmark-docker
benchmark: build-benchmark download-models
cd performance-tools/benchmark-scripts && python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT)
benchmark-stream-density: build-benchmark download-models
cd performance-tools/benchmark-scripts && python benchmark.py --compose_file ../../src/docker-compose.yml --target_fps $(TARGET_FPS) --density_increment 1 --results_dir $(RESULTS_DIR)
build-telegraf:
cd telegraf && $(MAKE) build
run-telegraf:
cd telegraf && $(MAKE) run
clean-telegraf:
./clean-containers.sh influxdb2
./clean-containers.sh telegraf
run-portainer:
docker compose -p portainer -f docker-compose-portainer.yml up -d
down-portainer:
docker compose -p portainer -f docker-compose-portainer.yml down
clean-results:
rm -rf results/*
clean-all:
docker rm -f $(docker ps -aq)
docs: clean-docs
mkdocs build
mkdocs serve -a localhost:8008
docs-builder-image:
docker build \
-f Dockerfile.docs \
-t $(MKDOCS_IMAGE) \
.
build-docs: docs-builder-image
docker run --rm \
-u $(shell id -u):$(shell id -g) \
-v $(PWD):/docs \
-w /docs \
$(MKDOCS_IMAGE) \
build
serve-docs: docs-builder-image
docker run --rm \
-it \
-u $(shell id -u):$(shell id -g) \
-p 8008:8000 \
-v $(PWD):/docs \
-w /docs \
$(MKDOCS_IMAGE)
clean-docs:
rm -rf docs/
helm-package:
helm package helm/ -u -d .deploy
helm package helm/
helm repo index .
helm repo index --url https://github.com/intel-retail/automated-self-checkout .