Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Make dlstreamer Docker image
- name: Make Model Downloader Pipeline Docker image
run: |
make build-download-models
env:
REGISTRY: "false"
- name: Make ASC Pipeline Docker image
run: |
make build
env:
REGISTRY: "false"
16 changes: 13 additions & 3 deletions .github/workflows/trivyimagescan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
if: github.event_name == 'pull_request'
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Checkout code for Push Request
if: github.event_name == 'push'
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2
Expand All @@ -40,11 +41,20 @@ jobs:
echo "running make build benchmark"
make build
env:
REGISTRY: "false"
REGISTRY: "false"

- name: Extract ASC value from VERSION file
id: extract_asc
run: |
pwd
ls -ltra
ASC_TAG=$(grep '^ASC=' VERSION | cut -d= -f2)
echo "ASC_TAG=$ASC_TAG" >> $GITHUB_OUTPUT

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
with:
image-ref: 'pipeline-runner-asc:3.6.2'
image-ref: 'pipeline-runner-asc:${{ steps.extract_asc.outputs.ASC_TAG}}'
format: 'table'
severity: 'CRITICAL,HIGH'
output: 'trivy-asc-results.txt'
Expand Down
51 changes: 26 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@ RESULTS_DIR ?= $(PWD)/benchmark



TAG ?= rc2
ASC_TAG := $(shell cat VERSION)
PT_TAG := $(shell cat performance-tools/VERSION)

#local image references
MODELDOWNLOADER_IMAGE ?= model-downloader-asc:3.6.2
PIPELINE_RUNNER_IMAGE ?= pipeline-runner-asc:3.6.2
BENCHMARK_IMAGE ?= benchmark:latest
MODELDOWNLOADER_IMAGE ?= model-downloader-asc:$(ASC_TAG)
PIPELINE_RUNNER_IMAGE ?= pipeline-runner-asc:$(ASC_TAG)
BENCHMARK_IMAGE ?= benchmark:$(PT_TAG)
REGISTRY ?= true

# Registry image references
REGISTRY_MODEL_DOWNLOADER ?= intel/model-downloader-asc:3.6.2
REGISTRY_PIPELINE_RUNNER ?= intel/pipeline-runner-asc:3.6.2
REGISTRY_BENCHMARK ?= intel/retail-benchmark:3.3.1
REGISTRY_MODEL_DOWNLOADER ?= intel/model-downloader-asc:$(ASC_TAG)
REGISTRY_PIPELINE_RUNNER ?= intel/pipeline-runner-asc:$(ASC_TAG)
REGISTRY_BENCHMARK ?= intel/retail-benchmark:$(PT_TAG)

download-models: check-models-needed

Expand Down Expand Up @@ -103,21 +104,21 @@ build-pipeline-server: | download-models update-submodules download-sample-video
docker build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -t dlstreamer:pipeline-server -f src/pipeline-server/Dockerfile.pipeline-server src/pipeline-server

build-sensors:
docker compose -f src/${DOCKER_COMPOSE_SENSORS} build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY}
ASC_TAG=$(ASC_TAG) docker compose -f src/${DOCKER_COMPOSE_SENSORS} build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY}

run:
@if [ "$(REGISTRY)" = "true" ]; then \
echo "Running registry version..."; \
echo "############### Running registry mode ###############################"; \
docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) up -d; \
ASC_TAG=$(ASC_TAG) docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) up -d; \
else \
echo "Running standard version..."; \
echo "############### Running STANDARD mode ###############################"; \
docker compose -f src/$(DOCKER_COMPOSE) up -d; \
ASC_TAG=$(ASC_TAG) docker compose -f src/$(DOCKER_COMPOSE) up -d; \
fi

run-sensors:
docker compose -f src/${DOCKER_COMPOSE_SENSORS} up -d
ASC_TAG=$(ASC_TAG) docker compose -f src/${DOCKER_COMPOSE_SENSORS} up -d


run-render-mode:
Expand All @@ -132,23 +133,23 @@ run-render-mode:
@xhost +local:docker
@if [ "$(REGISTRY)" = "true" ]; then \
echo "Running registry version with render mode..."; \
RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) up -d; \
ASC_TAG=$(ASC_TAG) RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) up -d; \
else \
echo "Running standard version with render mode..."; \
RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE) up -d; \
ASC_TAG=$(ASC_TAG) RENDER_MODE=1 docker compose -f src/$(DOCKER_COMPOSE) up -d; \
fi

down:
@if [ "$(REGISTRY)" = "true" ]; then \
echo "Stopping registry demo containers..."; \
docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) down; \
ASC_TAG=$(ASC_TAG) docker compose -f src/$(DOCKER_COMPOSE_REGISTRY) down; \
echo "Registry demo containers stopped and removed."; \
else \
docker compose -f src/$(DOCKER_COMPOSE) down; \
ASC_TAG=$(ASC_TAG) docker compose -f src/$(DOCKER_COMPOSE) down; \
fi

down-sensors:
docker compose -f src/${DOCKER_COMPOSE_SENSORS} down
ASC_TAG=$(ASC_TAG) docker compose -f src/${DOCKER_COMPOSE_SENSORS} down

run-demo: | download-models update-submodules download-sample-videos
@echo "Building automated self checkout app"
Expand All @@ -167,10 +168,10 @@ run-headless: | download-models update-submodules download-sample-videos
$(MAKE) run

run-pipeline-server: | download-models update-submodules download-sample-videos
RETAIL_USE_CASE_ROOT=$(RETAIL_USE_CASE_ROOT) docker compose -f src/pipeline-server/docker-compose.pipeline-server.yml up -d
ASC_TAG=$(ASC_TAG) 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
ASC_TAG=$(ASC_TAG) docker compose -f src/pipeline-server/docker-compose.pipeline-server.yml down

fetch-benchmark:
@echo "Fetching benchmark image from registry..."
Expand All @@ -185,7 +186,7 @@ build-benchmark:
else \
echo "Building pipeline-runner-asc img locally..."; \
docker build --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --target build-default -t $(PIPELINE_RUNNER_IMAGE) -f src/Dockerfile src/; \
cd performance-tools && $(MAKE) build-benchmark-docker; \
cd performance-tools && PT_TAG=$(PT_TAG) $(MAKE) build-benchmark-docker; \
fi

benchmark: build-benchmark download-models download-sample-videos
Expand All @@ -194,9 +195,9 @@ benchmark: build-benchmark download-models download-sample-videos
. venv/bin/activate && \
pip install -r requirements.txt && \
if [ "$(REGISTRY)" = "true" ]; then \
python benchmark.py --compose_file ../../src/$(DOCKER_COMPOSE_REGISTRY) --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR) --benchmark_type reg; \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python benchmark.py --compose_file ../../src/$(DOCKER_COMPOSE_REGISTRY) --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR) --benchmark_type reg; \
else \
python benchmark.py --compose_file ../../src/$(DOCKER_COMPOSE) --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR); \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python benchmark.py --compose_file ../../src/$(DOCKER_COMPOSE) --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR); \
fi && \
deactivate

Expand Down Expand Up @@ -226,7 +227,7 @@ benchmark-stream-density: build-benchmark download-models
. venv/bin/activate && \
pip install -r requirements.txt && \
if [ "$(REGISTRY)" = "true" ]; then \
python3 benchmark.py \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python3 benchmark.py \
--compose_file ../../src/$(DOCKER_COMPOSE_REGISTRY) \
--init_duration $(INIT_DURATION) \
--target_fps $(TARGET_FPS) \
Expand All @@ -235,7 +236,7 @@ benchmark-stream-density: build-benchmark download-models
--benchmark_type reg \
--results_dir $(RESULTS_DIR); \
else \
python3 benchmark.py \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python3 benchmark.py \
--compose_file ../../src/$(DOCKER_COMPOSE) \
--init_duration $(INIT_DURATION) \
--target_fps $(TARGET_FPS) \
Expand All @@ -252,10 +253,10 @@ benchmark-quickstart: build-benchmark download-models download-sample-videos
pip install -r requirements.txt && \
if [ "$(REGISTRY)" = "true" ]; then \
DEVICE_ENV=res/all-gpu.env RENDER_MODE=0 PIPELINE_SCRIPT=obj_detection_age_prediction.sh \
python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR) --benchmark_type reg; \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR) --benchmark_type reg; \
else \
DEVICE_ENV=res/all-gpu.env RENDER_MODE=0 PIPELINE_SCRIPT=obj_detection_age_prediction.sh \
python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR); \
ASC_TAG=$(ASC_TAG) PT_TAG=$(PT_TAG) python benchmark.py --compose_file ../../src/docker-compose.yml --pipeline $(PIPELINE_COUNT) --results_dir $(RESULTS_DIR); \
fi && \
deactivate
$(MAKE) consolidate-metrics
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7.2
4 changes: 2 additions & 2 deletions check_models.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# filepath: /home/intel/suryam/ASC/suryam789/automated-self-checkout/check_models.sh

set -eo pipefail
set -o pipefail

echo "Checking for models required by pipeline script..."

Expand Down Expand Up @@ -172,4 +172,4 @@ fi
# else
# echo "Insufficient models ($XML_COUNT < 12). Need to download."
# exit 0 # Need to download
# fi
# fi
2 changes: 1 addition & 1 deletion src/docker-compose-reg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- ./start_stream.sh:/home/pipeline-server/src/start_stream.sh

ClientGst:
image: intel/pipeline-runner-asc:3.6.2
image: intel/pipeline-runner-asc:${ASC_TAG}
deploy:
mode: replicated
replicas: ${PIPELINE_COUNT:-1}
Expand Down
4 changes: 2 additions & 2 deletions src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- ./start_stream.sh:/home/pipeline-server/src/start_stream.sh

ClientGst:
image: pipeline-runner-asc:3.6.2
image: pipeline-runner-asc:${ASC_TAG}
deploy:
mode: replicated
replicas: ${PIPELINE_COUNT:-1}
Expand Down Expand Up @@ -56,4 +56,4 @@ services:
- ./pipelines:/home/pipeline-server/pipelines
- ./extensions:/home/pipeline-server/extensions
- ${RETAIL_USE_CASE_ROOT:-}/models:/home/pipeline-server/models
restart: on-failure
restart: on-failure
Loading