Skip to content

Commit 3186052

Browse files
ktaube26p-zakdlemiechTadeusz Mateńkobharagha
authored
Release ViPPET 2025.2 – merge feature branch into main (#1423)
Signed-off-by: Pooja Kumbharkar <[email protected]> Signed-off-by: B, Vinod K <[email protected]> Signed-off-by: Vellaisamy, Sathyendran <[email protected]> Signed-off-by: Yeoh, Hoong Tee <[email protected]> Signed-off-by: Michalowski, Dawid <[email protected]> Signed-off-by: Krishna Murti <[email protected]> Signed-off-by: Vinod K B <[email protected]> Signed-off-by: Sathiyamoorthi, Jayabalaji <[email protected]> Co-authored-by: Zak, Pawel <[email protected]> Co-authored-by: Dariusz Lemiech <[email protected]> Co-authored-by: Tadeusz Mateńko <[email protected]> Co-authored-by: Raghu Bhat <[email protected]> Co-authored-by: Vinod Kumar B <[email protected]> Co-authored-by: Karol Blaszczak <[email protected]> Co-authored-by: Supriya Krishnamurthi <[email protected]> Co-authored-by: sathyendranv <[email protected]> Co-authored-by: msmiatac <[email protected]> Co-authored-by: Hoong Tee, Yeoh <[email protected]> Co-authored-by: nszczygl9 <[email protected]> Co-authored-by: Michal Holownia <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Dawid Michalowski <[email protected]> Co-authored-by: Tomasz Janczak <[email protected]> Co-authored-by: Pooja Kumbharkar <[email protected]> Co-authored-by: 14pankaj <[email protected]> Co-authored-by: LIU Lin <[email protected]> Co-authored-by: marcin-wadolkowski <[email protected]> Co-authored-by: mkobyli <[email protected]> Co-authored-by: Tomasz Bujewski <[email protected]> Co-authored-by: linjiaojiao <[email protected]> Co-authored-by: pbartosik <[email protected]> Co-authored-by: OskarFiedot <[email protected]> Co-authored-by: Yun Liu <[email protected]> Co-authored-by: Pankaj Kumar Singh <[email protected]> Co-authored-by: Krishna Murti <[email protected]> Co-authored-by: Nakul Bhardwaj <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Madhuri Kumari <[email protected]> Co-authored-by: Sebastian Golebiewski <[email protected]> Co-authored-by: Jeremy Ouillette <[email protected]> Co-authored-by: Sathiyamoorthi, Jayabalaji <[email protected]>
1 parent d8498e9 commit 3186052

File tree

191 files changed

+29586
-5773
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+29586
-5773
lines changed

.github/workflows/vippet-pr-workflow.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
branches:
77
- main
88
- release-*
9+
- initial-vippet-api
910
paths:
1011
- 'tools/visual-pipeline-and-platform-evaluation-tool/**'
1112
workflow_dispatch:
@@ -24,7 +25,7 @@ jobs:
2425
fail-fast: false
2526
uses: open-edge-platform/orch-ci/.github/workflows/pre-merge.yml@070a95caeeed643fc9d1a34c11eac78179ce136d # 0.1.34
2627
with:
27-
runs_on: ubuntu-24.04
28+
runs_on: ubuntu-24.04-16core-64GB
2829
bootstrap_tools: 'nodejs'
2930
run_version_check: false
3031
run_build: false

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.gradio/*
2+
.idea/*
3+
tools/visual-pipeline-and-platform-evaluation-tool/.venv/*
4+
tools/visual-pipeline-and-platform-evaluation-tool/intel/*
5+
tools/visual-pipeline-and-platform-evaluation-tool/models/*
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
__pycache__
22
.coverage
33
.env
4+
.idea
5+
shared/collector-signals/
46
shared/models/output/*
5-
shared/videos/
7+
shared/videos/input/*
8+
shared/videos/video-generator/*

tools/visual-pipeline-and-platform-evaluation-tool/Makefile

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ $(VENV_DIR): $(PROJECT_NAME)/requirements.txt ## Create Python venv
2525
python3 -m venv $@ ;\
2626
set +u; . ./$@/bin/activate; set -u ;\
2727
python -m pip install --upgrade pip ;\
28-
python -m pip install -r $(PROJECT_NAME)/requirements-dev.txt
28+
python -m pip install -r $(PROJECT_NAME)/requirements-dev.txt ;\
29+
python -m pip install -r video_generator/requirements.txt # needed for pyright checks
2930

3031
all: lint build run test ## Run lint, build, run and test
3132

@@ -56,76 +57,79 @@ pyright: $(VENV_DIR) ## Run pyright type checker
5657
pyright --version ;\
5758
pyright .
5859

59-
# Environment setup target: always run before build/run targets that need .env
60-
env-setup:
60+
generate_openapi: $(VENV_DIR) ## Generate OpenAPI schema file
61+
set +u; . ./$</bin/activate; set -u ;\
62+
cd $(PROJECT_NAME) ;\
63+
PYTHONPATH=. SUPPORTED_MODELS_FILE=../shared/models/supported_models.yaml RECORDINGS_PATH=../shared/videos/input python ../generate_openapi.py
64+
65+
env-setup: ## Environment setup target: always run before build/run targets that need .env and shared dirs
66+
mkdir -p shared/collector-signals && chmod o+w shared/collector-signals
67+
mkdir -p shared/models/output && chmod o+w shared/models/output
68+
mkdir -p shared/videos/input && chmod o+w shared/videos/input
69+
mkdir -p shared/videos/video-generator && chmod o+w shared/videos/video-generator
6170
./setup_env.sh
6271

63-
build: env-setup ## Build core images (vippet-app, vippet-collector)
64-
docker compose build
72+
build: env-setup ## Build core images (vippet-app, vippet-collector, vippet-ui)
73+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml build
6574

66-
build-dev: env-setup ## Build core dev images (vippet-app, vippet-collector)
67-
docker compose -f $(COMPOSE_FILE) -f $(DEV_COMPOSE_FILE) build
75+
build-dev: env-setup ## Build core dev images (vippet-app, vippet-collector, vippet-ui)
76+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml -f $(DEV_COMPOSE_FILE) build
6877

6978
build-videogenerator: env-setup ## Build videogenerator image
70-
docker compose build videogenerator
79+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml build videogenerator
7180

7281
build-models: env-setup ## Build model image
73-
docker compose build models
82+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml build models
7483

7584
docker-build: build build-videogenerator build-models ## Build all images
7685

7786
run: env-setup install-models-once ## Run the docker compose services
78-
docker compose up -d
87+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml up -d
7988

8089
run-videogenerator: env-setup build-videogenerator ## Run only the videogenerator service
81-
mkdir -p shared/videos && chmod o+w shared/videos
82-
docker compose up -d videogenerator
90+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml up -d videogenerator
8391

8492
run-dev: env-setup install-models-once ## Run the docker compose services for development
85-
docker compose -f $(COMPOSE_FILE) -f $(DEV_COMPOSE_FILE) up -d
93+
. .env && docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml -f $(DEV_COMPOSE_FILE) up -d
8694

8795
test: env-setup ## Run tests and generate coverage report
88-
# Run tests using the vippet-cpu container (tests are device agnostic)
96+
# Run tests using the cpu profile (tests are device agnostic)
8997
# Override DOCKER_TAG with '-test' suffix only for this docker compose run
90-
TARGET=test DOCKER_TAG="test" docker compose -f $(COMPOSE_FILE) run \
91-
--build --rm --no-deps --volume $(PROJECT_DIR):/home/dlstreamer/vippet vippet-cpu bash -c "\
98+
. .env && TARGET=test DOCKER_TAG="test" docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml run \
99+
--build --rm --no-deps --volume $(PROJECT_DIR):/home/dlstreamer/vippet vippet bash -c "\
92100
cd $(PROJECT_NAME) && \
93101
python -m coverage run --source=./ --data-file=/tmp/.vippet-coverage -m unittest discover -v -s ./tests -p '*_test.py' && \
94102
python -m coverage report --data-file=/tmp/.vippet-coverage --omit=*/config-3.py,*/config.py,*_test.py"
95103

96104
install-models-once: env-setup ## Handle models download and installation (once)
97-
mkdir -p shared/models/output && chmod o+w shared/models/output
98-
MODEL_INSTALLATION=once docker compose run --rm -it models
105+
. .env && MODEL_INSTALLATION=once docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml run --rm -it models
99106

100107
install-models-force: env-setup ## Handle models download and installation (force)
101-
mkdir -p shared/models/output && chmod o+w shared/models/output
102-
MODEL_INSTALLATION=force docker compose run --rm -it models
108+
. .env && MODEL_INSTALLATION=force docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml run --rm -it models
103109

104110
install-models-all: env-setup ## Install all models automatically (no dialog)
105-
mkdir -p shared/models/output && chmod o+w shared/models/output
106-
MODEL_INSTALLATION=all docker compose run --rm -it models
111+
. .env && MODEL_INSTALLATION=all docker compose -f $(COMPOSE_FILE) -f compose.$$COMPOSE_PROFILES.yml run --rm -it models
107112

108113
shell: env-setup ## Open shell in specified container (i.e. make shell SERVICE=vippet)
109114
docker exec -it $(SERVICE) bash
110115

111-
shell-vippet: env-setup ## Open shell in vippet container
116+
shell-vippet: ## Open shell in vippet container
112117
$(MAKE) shell SERVICE=vippet
113118

114-
shell-models: env-setup ## Open shell in models container
119+
shell-models: ## Open shell in models container
115120
$(MAKE) shell SERVICE=models
116121

117-
shell-collector: env-setup ## Open shell in collector container
122+
shell-collector: ## Open shell in collector container
118123
$(MAKE) shell SERVICE=collector
119124

120-
shell-videogenerator: env-setup ## Open shell in videogenerator container
125+
shell-videogenerator: ## Open shell in videogenerator container
121126
$(MAKE) shell SERVICE=videogenerator
122127

123128
stop: ## Stop the docker compose services
124-
@VIPPET_SERVICE=$$(docker compose ps --services | grep "^vippet-" | head -n 1 || echo ""); \
125-
docker compose down models collector videogenerator $$VIPPET_SERVICE
129+
docker compose down models collector videogenerator vippet-ui vippet
126130

127131
clean: ## Clean all build artifacts
128-
rm -rf shared/models/output/ shared/videos/
132+
rm -rf shared/collector-signals shared/models/output/ shared/videos/input shared/videos/video-generator
129133

130134
help: ## Print help for each target
131135
@echo ViPPET make targets

tools/visual-pipeline-and-platform-evaluation-tool/bounding_box.py

Lines changed: 0 additions & 71 deletions
This file was deleted.

tools/visual-pipeline-and-platform-evaluation-tool/bounding_box_test.py

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,61 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
9+
# Unless required by applicable law or agreed to in writing,
10+
# software distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions
13+
# and limitations under the License.
14+
15+
# SPDX-License-Identifier: Apache-2.0
16+
17+
# Base image for building qmassa
118
FROM docker.io/library/rust:1.88 AS qmassa
219

20+
# Set environment variable to non-interactive mode (avoids some prompts)
21+
ENV DEBIAN_FRONTEND=noninteractive
22+
23+
# Install necessary dependencies
324
RUN apt-get update && \
4-
apt-get install -y --no-install-recommends \
5-
libudev-dev && \
25+
apt-get install --yes --no-install-recommends libudev-dev && \
626
apt-get clean && \
727
rm -rf /var/lib/apt/lists/*
828

9-
RUN cargo install --locked --git https://github.com/ulissesf/qmassa.git --tag v1.0.1
29+
# Install qmassa
30+
RUN cargo install --locked [email protected]
1031

32+
# Final image for the collector
1133
FROM docker.io/library/telegraf:1.36.3 AS collector
1234

35+
# Copy qmassa binary from the build stage
1336
COPY --from=qmassa /usr/local/cargo/bin/qmassa /usr/local/bin/qmassa
1437

38+
# Set environment variable to non-interactive mode (avoids some prompts)
39+
ENV DEBIAN_FRONTEND=noninteractive
40+
41+
# Install necessary dependencies
1542
RUN apt-get update && \
16-
apt-get install -y --no-install-recommends \
17-
python3 && \
43+
apt-get install --yes --no-install-recommends python3 supervisor && \
1844
apt-get clean && \
1945
rm -rf /var/lib/apt/lists/*
2046

47+
# Set working directory
2148
WORKDIR /app
2249

50+
# Copy configuration and scripts
51+
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
2352
COPY telegraf.conf /etc/telegraf
2453
COPY qmassa_reader.py qmassa_reader.py
2554
COPY read_cpu_freq.sh read_cpu_freq.sh
26-
RUN chmod +x read_cpu_freq.sh
55+
COPY entrypoint.sh /entrypoint.sh
56+
57+
# Make scripts executable
58+
RUN chmod +x read_cpu_freq.sh /entrypoint.sh
2759

28-
# nosemgrep: missing-user-entrypoint
29-
ENTRYPOINT ["/usr/bin/telegraf", "--config", "/etc/telegraf/telegraf.conf"]
60+
# Set the entrypoint to the custom script
61+
CMD ["/entrypoint.sh"]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# Ensure the fps.txt file exists and is initialized to 0.0 and can be written to by vippet
4+
echo "0.0" > /app/.collector-signals/fps.txt
5+
chmod o+w /app/.collector-signals/fps.txt
6+
7+
# Ensure the named pipe for qmassa exists and is writable
8+
if [ ! -p /app/qmassa.fifo ]; then
9+
mkfifo /app/qmassa.fifo
10+
fi
11+
chmod 666 /app/qmassa.fifo
12+
13+
# Telegraf and qmassa are started and managed by supervisord
14+
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf

0 commit comments

Comments
 (0)