Skip to content

Commit

Permalink
Feat: v3.1.0 merge to main (#621)
Browse files Browse the repository at this point in the history
* fix: docker images, multiple videos, and image update

Signed-off-by: Brian McGinn <[email protected]>

* feat: Add env-file to pipeline server

Signed-off-by: Brian McGinn <[email protected]>

* fix: Remove unused pipeline servers and proxies

Signed-off-by: Brian McGinn <[email protected]>

* fix: pipeline server name update

Signed-off-by: Brian McGinn <[email protected]>

* fix: add pipeline init to proxy

Signed-off-by: Brian McGinn <[email protected]>

* fix: change visualizer and pipeline server container to use host network

Signed-off-by: Brian McGinn <[email protected]>

* feat: Use 3 different streams

Signed-off-by: Brian McGinn <[email protected]>

* feat: signal server on host

Signed-off-by: Brian McGinn <[email protected]>

* fix: server on host network

Signed-off-by: Brian McGinn <[email protected]>

* fix: Match pipeline template

Signed-off-by: Brian McGinn <[email protected]>

* feat: docker on host

Signed-off-by: Brian McGinn <[email protected]>

* feat: update to version 5

Signed-off-by: Brian McGinn <[email protected]>

* fix: remove unused servers from status script

Signed-off-by: Brian McGinn <[email protected]>

* fix: Replicate pipelines to enable visualization

Signed-off-by: Brian McGinn <[email protected]>

* fix: Update pipeline.json timing

---------

Signed-off-by: Brian McGinn <[email protected]>
  • Loading branch information
brian-intel authored Oct 8, 2024
1 parent 76046b2 commit 0dd7e82
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 142 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ 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 --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
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
Expand Down
9 changes: 6 additions & 3 deletions src/pipeline-server/.env
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Visualizer envs
GRAFANA_SERVER=0.0.0.0
GRAFANA_PORT=3000
HOST_IP=127.0.0.1
EVAM_ADDRESS=evam_0
HOST_IP=localhost
EVAM_PORT=8080
EVA_DEFAULT_PORT=8082
EVA_REACT_PORT=8083
SIGNALLING_PORT=8443
RTSP_PORT=8554
WEBRTC_SIGNALING_SERVER=ws://webrtc-signaling-server:8443
no_proxy=pipeline-init,camera-simulator,webrtc-signaling-server,edge-video-analytics-microservice,multimodal-data-visualization-streaming,multimodal-data-visualization,127.0.0.1/8,localhost,172.22.238.0/24,172.22.238.4
APPLICATION_RESTART_FREQ_SECS=60
RUNTIME_LICENSE_CHECK_FREQ_SECS=3600
RUNTIME_LICENSE_CHECK_FREQ_SECS=3600
http_proxy=
https_proxy=
RTSP_CAMERA_IP=
2 changes: 1 addition & 1 deletion src/pipeline-server/Dockerfile.pipeline-server
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

FROM intel/dlstreamer-pipeline-server:2022.2.0-ubuntu20-gpu419.40
FROM intel/edge_video_analytics_microservice:2.0.0

COPY ./requirements.txt /requirements.txt
RUN pip3 install --upgrade pip --no-cache-dir -r /requirements.txt
56 changes: 56 additions & 0 deletions src/pipeline-server/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,62 @@
"auto_start": false,
"publish_frame": true
},
{
"name": "yolov5_effnet_1",
"source": "gstreamer",
"queue_maxsize": 50,
"pipeline":"{auto_source} ! decodebin ! videoscale ! video/x-raw,width=1280,height=720 ! gvadetect model={models[object_detection][yolov5s][FP16-INT8][network]} name=detection threshold=.5 ! gvatrack name=tracking tracking-type=zero-term-imageless ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! gvaclassify model={models[object_classification][efficientnet-b0][network]} inference-region=roi-list name=classification ! gvametaconvert name=metaconvert ! gvametapublish name=destination ! appsink name=appsink",
"description": "Object detection with yolov5s",
"parameters": {
"type": "object",
"properties": {
"detection-properties": {
"element": {
"name": "detection",
"format": "element-properties"
}
},
"detection-device": {
"element": {
"name": "detection",
"property": "device"
},
"type": "string",
"default": "{env[DETECTION_DEVICE]}"
}
}
},
"auto_start": false,
"publish_frame": true
},
{
"name": "yolov5_effnet_2",
"source": "gstreamer",
"queue_maxsize": 50,
"pipeline":"{auto_source} ! decodebin ! videoscale ! video/x-raw,width=1280,height=720 ! gvadetect model={models[object_detection][yolov5s][FP16-INT8][network]} name=detection threshold=.5 ! gvatrack name=tracking tracking-type=zero-term-imageless ! queue max-size-bytes=0 max-size-buffers=0 max-size-time=0 ! gvaclassify model={models[object_classification][efficientnet-b0][network]} inference-region=roi-list name=classification ! gvametaconvert name=metaconvert ! gvametapublish name=destination ! appsink name=appsink",
"description": "Object detection with yolov5s",
"parameters": {
"type": "object",
"properties": {
"detection-properties": {
"element": {
"name": "detection",
"format": "element-properties"
}
},
"detection-device": {
"element": {
"name": "detection",
"property": "device"
},
"type": "string",
"default": "{env[DETECTION_DEVICE]}"
}
}
},
"auto_start": false,
"publish_frame": true
},
{
"name": "yolov5_full",
"source": "gstreamer",
Expand Down
161 changes: 52 additions & 109 deletions src/pipeline-server/docker-compose.pipeline-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ services:
camera-simulator:
container_name: camera-simulator
image: aler9/rtsp-simple-server
ipc: "none"
ports:
- "8555:8554"
environment:
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
networks:
checkout-network: {}
camera-simulator0:
Expand All @@ -46,11 +46,11 @@ services:
entrypoint: ["/bin/sh","-c"]
command:
- |
if [ ! -f /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 ]; then
if [ ! -f /home/pipeline-server/sample-media/barcode-1920-15-bench.mp4 ]; then
mkdir -p /home/pipeline-server/sample-media
wget -O /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 https://www.pexels.com/download/video/4465029
wget -O /home/pipeline-server/sample-media/barcode-1920-15-bench.mp4 https://github.com/antoniomtz/sample-clips/raw/main/barcode.mp4
fi
ffmpeg -nostdin -re -stream_loop -1 -i /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 -c copy -f rtsp -rtsp_transport tcp rtsp://camera-simulator:8554/camera_1
ffmpeg -nostdin -re -stream_loop -1 -i /home/pipeline-server/sample-media/barcode-1920-15-bench.mp4 -c copy -f rtsp -rtsp_transport tcp rtsp://camera-simulator:8554/camera_1
depends_on:
- camera-simulator
volumes:
Expand All @@ -63,107 +63,53 @@ services:
entrypoint: ["/bin/sh","-c"]
command:
- |
if [ ! -f /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 ]; then
if [ ! -f /home/pipeline-server/sample-media/vehicle-bike-1920-15-bench.mp4 ]; then
mkdir -p /home/pipeline-server/sample-media
wget -O /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 https://www.pexels.com/download/video/4465029
wget -O /home/pipeline-server/sample-media/vehicle-bike-1920-15-bench.mp4 https://www.pexels.com/download/video/853908
fi
ffmpeg -nostdin -re -stream_loop -1 -i /home/pipeline-server/sample-media/coca-cola-4465029-1920-15-bench.mp4 -c copy -f rtsp -rtsp_transport tcp rtsp://camera-simulator:8554/camera_2
ffmpeg -nostdin -re -stream_loop -1 -i /home/pipeline-server/sample-media/vehicle-bike-1920-15-bench.mp4 -c copy -f rtsp -rtsp_transport tcp rtsp://camera-simulator:8554/camera_2
depends_on:
- camera-simulator
volumes:
- ${RETAIL_USE_CASE_ROOT:-..}/performance-tools/sample-media:/home/pipeline-server/sample-media
networks:
checkout-network: {}

evamclient0:
container_name: evam_0
image: amr-registry.caas.intel.com/nex-microservices/intel/edge_video_analytics_microservice@sha256:5588f0488d908bc07daab9555c2776eb4a9bead78f43dde2eec452b610a534b4
evamclient:
container_name: edge-video-analytics-microservice
image: intel/edge_video_analytics_microservice:2.0.0
ports:
- 8080:8080
- ${EVAM_PORT}:${EVAM_PORT}
environment:
- ENABLE_WEBRTC=true
- WEBRTC_SIGNALING_SERVER=ws://webrtc-signaling-server:8443
- RUN_MODE=EVA
- DETECTION_DEVICE=CPU
- CLASSIFICATION_DEVICE=CPU
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
- no_proxy="webrtc-signaling-server,edge-video-analytics-microservice,multimodal-data-visualization-streaming,multimodal-data-visualization,127.0.0.1/8,localhost,172.22.238.0/24,172.22.238.4"
- EMIT_SOURCE_AND_DESTINATION=true
volumes:
- ${RETAIL_USE_CASE_ROOT:-..}/src/extensions:/home/pipeline-server/gvapython
- ${RETAIL_USE_CASE_ROOT:-../..}/models:/home/pipeline-server/models
- ${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/asc:/home/pipeline-server/pipelines
- "${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/config.json:/home/pipeline-server/config.json"
networks:
checkout-network: {}

evamclient1:
container_name: evam_1
image: amr-registry.caas.intel.com/nex-microservices/intel/edge_video_analytics_microservice@sha256:5588f0488d908bc07daab9555c2776eb4a9bead78f43dde2eec452b610a534b4
ports:
- 8556:8554
- 8071:8080
environment:
- ENABLE_RTSP=true
- RTSP_PORT=8556
- ENABLE_WEBRTC=true
- WEBRTC_SIGNALING_SERVER=ws://localhost:8444
- RUN_MODE=EVA
- DETECTION_DEVICE=CPU
- CLASSIFICATION_DEVICE=CPU
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
volumes:
- ${RETAIL_USE_CASE_ROOT:-..}/src/extensions:/home/pipeline-server/gvapython
- ${RETAIL_USE_CASE_ROOT:-../..}/models:/home/pipeline-server/models
- ${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/asc:/home/pipeline-server/pipelines
- "${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/config.json:/home/pipeline-server/config.json"
networks:
checkout-network: {}

evamclient2:
container_name: evam_2
image: amr-registry.caas.intel.com/nex-microservices/intel/edge_video_analytics_microservice@sha256:5588f0488d908bc07daab9555c2776eb4a9bead78f43dde2eec452b610a534b4
ports:
- 8557:8554
- 8072:8080
environment:
- ENABLE_RTSP=true
- RTSP_PORT=8557
- ENABLE_WEBRTC=true
- WEBRTC_SIGNALING_SERVER=ws://localhost:8445
- RUN_MODE=EVA
- DETECTION_DEVICE=CPU
- CLASSIFICATION_DEVICE=CPU
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
ENABLE_WEBRTC: true
WEBRTC_SIGNALING_SERVER: ws://localhost:8443
RUN_MODE: EVA
DETECTION_DEVICE: CPU
CLASSIFICATION_DEVICE: CPU
EMIT_SOURCE_AND_DESTINATION: true
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy},${RTSP_CAMERA_IP}
env_file:
- .env
volumes:
- ${RETAIL_USE_CASE_ROOT:-..}/src/extensions:/home/pipeline-server/gvapython
- ${RETAIL_USE_CASE_ROOT:-../..}/models:/home/pipeline-server/models
- ${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/asc:/home/pipeline-server/pipelines
- "${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/config.json:/home/pipeline-server/config.json"
networks:
checkout-network: {}
network_mode: host

pipeline-init:
image: postman/newman
container_name: pipeline-init
command: run /postman/pipeline.json -e "/postman/env.json" --verbose
environment:
- http_proxy=
- https_proxy=
- HTTP_PROXY=
- HTTPS_PROXY=
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
volumes:
- ./postman/:/postman
networks:
checkout-network: {}
network_mode: host

mqtt-broker:
command:
Expand All @@ -188,7 +134,7 @@ services:
checkout-network: {}

multimodal-data-visualization-streaming:
image: amr-registry.caas.intel.com/nex-microservices/intel/multimodal-data-visualization-streaming@sha256:962cf7576ee28d5b3568693408edaca3c0216ed6e2d956aac2e66245db852d99
image: intel/multimodal-data-visualization-streaming:5.0.0
container_name: multimodal-data-visualization-streaming
ipc: "none"
tmpfs:
Expand All @@ -202,9 +148,9 @@ services:
- no-new-privileges
environment:
MODE: "EVA"
http_proxy:
https_proxy:
no_proxy:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
AppName: "MultiModalVisualizationStreaming"
LSHOST: host.docker.internal
LSFEATURE_NAME: "MultiModalVisStreaming"
Expand All @@ -224,13 +170,12 @@ services:
env_file:
- .env
ports:
- 8082:8082
- 8083:8083
networks:
checkout-network: {}
- ${EVA_DEFAULT_PORT}:${EVA_DEFAULT_PORT}
- ${EVA_REACT_PORT}:${EVA_REACT_PORT}
network_mode: host

multimodal-data-visualization:
image: amr-registry.caas.intel.com/nex-microservices/intel/multimodal-data-visualization@sha256:b786f7c5cd82cda0cb39c912748a667aef8fc03ed8adf196ca44b84c3cd3a69b
image: intel/multimodal-data-visualization:5.0.0
container_name: multimodal-data-visualization
ipc: "none"
security_opt:
Expand All @@ -250,12 +195,12 @@ services:
- "vol_temp_grafana:/tmp"
- ${RETAIL_USE_CASE_ROOT:-..}/src/pipeline-server/grafana:/app/eva
environment:
HOST_IP: evam_0
HOST_IP: ${HOST_IP}
MODE: "EVA"
http_proxy:
https_proxy:
no_proxy:
GRAFANA_SERVER: 0.0.0.0
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
GRAFANA_SERVER: ${GRAFANA_SERVER}
AppName: "MultiModalVisualization"
LSFEATURE_NAME: "MultiModalVisualization"
LSHOST: host.docker.internal
Expand All @@ -264,23 +209,21 @@ services:
env_file:
- .env
ports:
- 3000:3000
networks:
checkout-network: {}
- ${GRAFANA_PORT}:${GRAFANA_PORT}
network_mode: host

webrtc-signaling-server:
image: amr-registry.caas.intel.com/nex-microservices/intel/simple-signaling-server@sha256:1c8dd5860149c3e6403280d66c6eb06e47a774084ebed2deb1cc9e5f69b2b2b7
image: intel/simple-signaling-server:4.0.3
container_name: webrtc-signaling-server
read_only: true
environment:
http_proxy:
https_proxy:
no_proxy:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
ipc: "none"
security_opt:
- no-new-privileges
networks:
checkout-network: {}
network_mode: host
healthcheck:
test: ["CMD-SHELL", "exit", "0"]
interval: 5m
Expand All @@ -295,7 +238,7 @@ services:
env_file:
- .env
ports:
- 8443:8443
- ${SIGNALLING_PORT}:${SIGNALLING_PORT}

volumes:
vol_temp_grafana:
Expand Down
6 changes: 3 additions & 3 deletions src/pipeline-server/grafana/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"links": [
{
"title": "",
"url": "http://evam_0:8080/pipelines/status"
"url": "http://localhost:8080/pipelines/status"
}
],
"maxDataPoints": 200,
Expand Down Expand Up @@ -167,7 +167,7 @@
"root_selector": "",
"source": "url",
"type": "json",
"url": "http://evam_0:8080/pipelines/status",
"url": "http://localhost:8080/pipelines/status",
"url_options": {
"data": "",
"method": "GET"
Expand Down Expand Up @@ -245,7 +245,7 @@
"root_selector": "",
"source": "url",
"type": "json",
"url": "http://evam_0:8080/pipelines/status",
"url": "http://localhost:8080/pipelines/status",
"url_options": {
"data": "",
"method": "GET"
Expand Down
Loading

0 comments on commit 0dd7e82

Please sign in to comment.