Skip to content

Commit

Permalink
V3.0.0 (#563)
Browse files Browse the repository at this point in the history
* Release3 cleanup (#553)

* fix: Reduce automated-self-checkout to only include use case files

---------

Signed-off-by: Brian McGinn <[email protected]>
Co-authored-by: Jim Wang @ Intel <[email protected]>
Co-authored-by: Antonio Martinez <[email protected]>
  • Loading branch information
3 people authored May 7, 2024
1 parent 94ef4ac commit f6a6bd9
Show file tree
Hide file tree
Showing 345 changed files with 1,096 additions and 68,354 deletions.
35 changes: 3 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,16 @@
.vscode
results/*
sample-media/*.mp4
camera-simulator/rtsp_simple_server.log.txt
docs/sitemap.xml.gz
docs/*

benchmark-scripts/results/
camera-simulator/rtsp_simple_server.log.txt
configs/opencv-ovms/images/sample-bottle.jpg
configs/opencv-ovms/models/2022/efficientnetb0/
configs/opencv-ovms/models/2022/config.json
configs/opencv-ovms/models/2022/config_ovms-server*.json
configs/opencv-ovms/models/2022/face-detection-retail-0005/
configs/opencv-ovms/models/2022/face-detect-retail-0005/
configs/opencv-ovms/models/2022/face-landmarks-0002/
configs/opencv-ovms/models/2022/face-reid-retail-0095/
configs/opencv-ovms/models/2022/instance-segmentation-security-1040/
configs/opencv-ovms/models/2022/instance_segmentation_omz_1040/
configs/opencv-ovms/models/2022/BiT_M_R50x1_10C_50e_IR/
configs/opencv-ovms/models/2022/yolov5s
configs/opencv-ovms/models/2022/ssd_mobilenet_v1_coco/
configs/opencv-ovms/models/2022/person-detection-retail-0013/
configs/opencv-ovms/models/2022/person_vehicle_bike_detection_2000/
configs/opencv-ovms/models/2022/person-vehicle-bike-detection-2000/
configs/opencv-ovms/models/2022/text-detect-0002/
configs/opencv-ovms/models/2022/yolov8/
configs/opencv-ovms/grpc_go/results/
configs/opencv-ovms/cmd_client/ovms-client
configs/opencv-ovms/cmd_client/profile-launcher
!configs/opencv-ovms/scripts
!configs/opencv-ovms/envs
envs
scripts
ovms-client
profile-launcher
stream_density.sh
results/
efficientnet-b0/
model_server/
ssd_mobilenet_v1_coco/
__pycache__
smoke_tests_output.log
grpc_predict_v2.proto
text-recognition-0012-mod
horizontal-text-detection-0002
models/
src/cl-cache/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "performance-tools"]
path = performance-tools
url = https://github.com/intel-retail/performance-tools
22 changes: 0 additions & 22 deletions Dockerfile.bitModel

This file was deleted.

226 changes: 53 additions & 173 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,126 +1,87 @@
# Copyright © 2024 Intel Corporation. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

.PHONY: build-dlstreamer build-dlstreamer-realsense build-grpc-python build-grpc-go build-python-apps build-telegraf
.PHONY: build-capi_face_detection build-capi_yolov5 build-capi_yolov5_ensemble build-capi_yolov8_ensemble
.PHONY: run-camera-simulator run-telegraf run-portainer run-pipelines
.PHONY: clean-grpc-go clean-segmentation clean-ovms clean-all clean-results clean-telegraf clean-models clean-webcam
.PHONY: clean-ovms-server-configs clean-ovms-server
.PHONY: down-portainer down-pipelines
.PHONY: clean clean-simulator clean-object-detection clean-classification clean-gst clean-capi_face_detection clean-capi_yolov5 clean-capi_yolov5_ensemble clean-capi_yolov8_ensemble
.PHONY: list-profiles
.PHONY: unit-test-profile-launcher build-profile-launcher profile-launcher-status clean-profile-launcher webcam-rtsp
.PHONY: clean-test
.PHONY: hadolint
.PHONY: get-realsense-serial-num
.PHONY: run-demo run-cached-demo
.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 stop-demo

MKDOCS_IMAGE ?= asc-mkdocs
DGPU_TYPE ?= arc # arc|flex
PIPELINE_COUNT ?= 1
TARGET_FPS ?= 14.95
DOCKER_COMPOSE ?= docker-compose.yml

build-dlstreamer:
docker build --no-cache --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --target build-default -t dlstreamer:dev -f Dockerfile.dlstreamer .
download-models:
./download_models/downloadModels.sh

build-dlstreamer-realsense:
docker build --no-cache --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --target build-realsense -t dlstreamer:realsense -f Dockerfile.dlstreamer .
download-sample-videos:
cd performance-tools/benchmark-scripts && ./download_sample_videos.sh

get-realsense-serial-num:
@./get-realsense-serialno.sh

build-telegraf:
cd telegraf && $(MAKE) build

run-camera-simulator:
./camera-simulator/camera-simulator.sh

run-telegraf:
cd telegraf && $(MAKE) run

run-portainer:
docker compose -p portainer -f docker-compose-portainer.yml up -d

run-pipelines:
@./scripts/gen_ovms_model_config_json.sh
docker compose -f docker-compose.yml up -d

clean:
./clean-containers.sh automated-self-checkout

clean-simulator:
./clean-containers.sh camera-simulator

build-profile-launcher:
@mkdir -p ./results || true
@cd ./configs/opencv-ovms/cmd_client && $(MAKE) build
@./create-symbolic-link.sh $(PWD)/configs/opencv-ovms/cmd_client/profile-launcher profile-launcher
@./create-symbolic-link.sh $(PWD)/configs/opencv-ovms/scripts scripts
@./create-symbolic-link.sh $(PWD)/configs/opencv-ovms/envs envs
@./create-symbolic-link.sh $(PWD)/benchmark-scripts/stream_density.sh stream_density.sh

build-ovms-server:
HTTPS_PROXY=${HTTPS_PROXY} HTTP_PROXY=${HTTP_PROXY} docker pull openvino/model_server:2023.1-gpu

clean-profile-launcher: clean-grpc-python clean-grpc-go clean-segmentation clean-object-detection clean-classification clean-gst clean-capi_face_detection clean-test clean-capi_yolov5 clean-capi_yolov5_ensemble clean-capi_yolov8_ensemble
@echo "containers launched by profile-launcher are cleaned up."
@pkill -9 profile-launcher || true

profile-launcher-status:
$(eval profileLauncherPid = $(shell ps -aux | grep ./profile-launcher | grep -v grep))
$(if $(strip $(profileLauncherPid)), @echo "$@: profile-launcher running: "$(profileLauncherPid), @echo "$@: profile laucnher stopped")
clean-models:
@find ./models/ -mindepth 1 -maxdepth 1 -type d -exec sudo rm -r {} \;

clean-test:
./clean-containers.sh test
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

clean-grpc-python:
./clean-containers.sh grpc_python
update-submodules:
@git submodule update --init --recursive
@git submodule update --remote --merge

clean-grpc-go:
./clean-containers.sh grpc_go
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/

clean-gst:
./clean-containers.sh gst
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/

clean-segmentation:
./clean-containers.sh segmentation
run:
docker compose -f src/$(DOCKER_COMPOSE) up -d

clean-object-detection:
./clean-containers.sh object-detection
run-render-mode:
xhost +local:docker
RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE) up -d

clean-classification:
./clean-containers.sh classification
down:
docker compose -f src/$(DOCKER_COMPOSE) down

clean-ovms-server: clean-ovms-server-configs
./clean-containers.sh ovms-server
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

clean-ovms: clean-profile-launcher clean-ovms-server
build-benchmark:
cd performance-tools && $(MAKE) build-benchmark-docker

clean-capi_face_detection:
./clean-containers.sh capi_face_detection
benchmark: build-benchmark download-models
cd performance-tools/benchmark-scripts && python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT)

clean-capi_yolov5:
./clean-containers.sh capi_yolov5
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)

clean-capi_yolov5_ensemble:
./clean-containers.sh capi_yolov5_ensemble
build-telegraf:
cd telegraf && $(MAKE) build

clean-capi_yolov8_ensemble:
./clean-containers.sh capi_yolov8_ensemble
run-telegraf:
cd telegraf && $(MAKE) run

clean-telegraf:
./clean-containers.sh influxdb2
./clean-containers.sh telegraf

clean-webcam:
./clean-containers.sh webcam
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

down-pipelines:
docker compose -f docker-compose.yml down
@if [ -f ./configs/opencv-ovms/models/2022/config.json ]; then rm ./configs/opencv-ovms/models/2022/config.json; fi;
clean-results:
rm -rf results/*

clean-all: clean clean-ovms clean-simulator clean-results clean-telegraf clean-webcam down-pipelines
clean-all:
docker rm -f $(docker ps -aq)

docs: clean-docs
mkdocs build
Expand Down Expand Up @@ -149,86 +110,5 @@ serve-docs: docs-builder-image
-w /docs \
$(MKDOCS_IMAGE)

build-grpc-python: build-profile-launcher
cd configs/opencv-ovms/grpc_python && $(MAKE) build

build-grpc-go: build-profile-launcher
cd configs/opencv-ovms/grpc_go && $(MAKE) build

build-python-apps: build-profile-launcher
cd configs/opencv-ovms/demos && make build

build-capi_face_detection: build-profile-launcher
cd configs/opencv-ovms/gst_capi && DGPU_TYPE=$(DGPU_TYPE) $(MAKE) build_face_detection

build-capi_yolov5: build-profile-launcher
cd configs/opencv-ovms/gst_capi && DGPU_TYPE=$(DGPU_TYPE) $(MAKE) build_capi_yolov5

build-capi_yolov5_ensemble: build-profile-launcher
cd configs/opencv-ovms/gst_capi && DGPU_TYPE=$(DGPU_TYPE) $(MAKE) build_capi_yolov5_ensemble

build-capi_yolov8_ensemble: build-profile-launcher
cd configs/opencv-ovms/gst_capi && DGPU_TYPE=$(DGPU_TYPE) $(MAKE) build_capi_yolov8_ensemble

clean-docs:
rm -rf docs/

clean-results:
sudo rm -rf results/*

clean-ovms-server-configs:
@find ./configs/opencv-ovms/models/2022/ -mindepth 1 -maxdepth 1 -name 'config_ovms-server*.json' -delete

list-profiles:
@echo "Here is the list of profile names, you may choose to use one of them for pipeline run script:"
@echo
@find ./configs/opencv-ovms/cmd_client/res/ -mindepth 1 -maxdepth 1 -type d -exec basename {} \;
@echo
@echo "Example: "
@echo "PIPELINE_PROFILE=\"grpc_python\" sudo -E ./run.sh --platform core --inputsrc rtsp://127.0.0.1:8554/camera_0"

clean-models:
@find ./configs/opencv-ovms/models/2022/ -mindepth 1 -maxdepth 1 -type d -exec sudo rm -r {} \;

unit-test-profile-launcher:
@cd ./configs/opencv-ovms/cmd_client && $(MAKE) unit-test

webcam-rtsp:
docker run --rm \
-v $(PWD)/camera-simulator/mediamtx.yml:/mediamtx.yml \
-d \
-p 8554:8554 \
--device=/dev/video0 \
--name webcam \
bluenviron/mediamtx:latest-ffmpeg

run-smoke-tests:
@echo "Running smoke tests for OVMS profiles"
@./run_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

hadolint:
@echo "Run hadolint..."
@docker run --rm -v `pwd`:/automated-self-checkout --entrypoint /bin/hadolint hadolint/hadolint:latest \
--config /automated-self-checkout/.github/.hadolint.yaml \
`sudo find * -type f -name 'Dockerfile*' | xargs -i echo '/automated-self-checkout/{}'` | grep error \
| grep -v model_server \
|| echo "no issue found"

run-demo:
@echo "Building python apps"
$(MAKE) build-python-apps
@echo "Downloading sample videos"
cd benchmark-scripts && ./download_sample_videos.sh
@echo "Running camera simulator"
$(MAKE) run-camera-simulator
@echo Running Object_detection gRPC pipeline
PIPELINE_PROFILE="object_detection" RENDER_MODE=1 sudo -E ./run.sh --platform core --inputsrc rtsp://127.0.0.1:8554/camera_1

run-cached-demo:
@echo "Running camera simulator"
$(MAKE) run-camera-simulator
@echo Running Object_detection gRPC pipeline
PIPELINE_PROFILE="object_detection" RENDER_MODE=1 sudo -E ./run.sh --platform core --inputsrc rtsp://127.0.0.1:8554/camera_1
Loading

0 comments on commit f6a6bd9

Please sign in to comment.