From 94483209c7d898fb29cc4e3f5b49dd96c704d045 Mon Sep 17 00:00:00 2001 From: Mirko Curtolo Date: Thu, 4 Dec 2025 15:25:32 +0100 Subject: [PATCH 1/2] Move compose variables into brick config file --- .../audio_classification/brick_compose.yaml | 2 -- .../audio_classification/brick_config.yaml | 10 ++++++++++ .../dbstorage_tsstore/brick_compose.yaml | 5 ----- .../dbstorage_tsstore/brick_config.yaml | 15 ++++++++++++++- .../image_classification/brick_compose.yaml | 2 -- .../image_classification/brick_config.yaml | 10 ++++++++++ .../keyword_spotting/brick_compose.yaml | 2 -- .../app_bricks/keyword_spotting/brick_config.yaml | 10 ++++++++++ .../motion_detection/brick_compose.yaml | 2 -- .../app_bricks/motion_detection/brick_config.yaml | 10 ++++++++++ .../object_detection/brick_compose.yaml | 3 +-- .../app_bricks/object_detection/brick_config.yaml | 12 +++++++++++- .../video_imageclassification/brick_compose.yaml | 2 -- .../video_imageclassification/brick_config.yaml | 12 +++++++++++- .../video_objectdetection/brick_compose.yaml | 2 -- .../video_objectdetection/brick_config.yaml | 12 +++++++++++- .../visual_anomaly_detection/brick_compose.yaml | 2 -- .../visual_anomaly_detection/brick_config.yaml | 10 ++++++++++ 18 files changed, 98 insertions(+), 25 deletions(-) diff --git a/src/arduino/app_bricks/audio_classification/brick_compose.yaml b/src/arduino/app_bricks/audio_classification/brick_compose.yaml index 0a710c5f..2ca9f3b6 100644 --- a/src/arduino/app_bricks/audio_classification/brick_compose.yaml +++ b/src/arduino/app_bricks/audio_classification/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_AUDIO_CLASSIFICATION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-audio-classifier-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/audio_classification/brick_config.yaml b/src/arduino/app_bricks/audio_classification/brick_config.yaml index 1b1836bc..3bd33919 100644 --- a/src/arduino/app_bricks/audio_classification/brick_config.yaml +++ b/src/arduino/app_bricks/audio_classification/brick_config.yaml @@ -9,3 +9,13 @@ requires_model: true model: glass-breaking model_configuration_variables: - EI_AUDIO_CLASSIFICATION_MODEL +variables: +- name: EI_AUDIO_CLASSIFICATION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/dbstorage_tsstore/brick_compose.yaml b/src/arduino/app_bricks/dbstorage_tsstore/brick_compose.yaml index b43f55c6..7ca01e0b 100644 --- a/src/arduino/app_bricks/dbstorage_tsstore/brick_compose.yaml +++ b/src/arduino/app_bricks/dbstorage_tsstore/brick_compose.yaml @@ -1,8 +1,3 @@ -# BIND_ADDRESS = external container address -# BIND_PORT = container port -# DB_USERNAME = Edge Impulse project API key -# DB_PASSWORD = Database password -# INFLUXDB_ADMIN_TOKEN = InfluxDB admin token services: dbstorage-influx: image: influxdb:2.7 diff --git a/src/arduino/app_bricks/dbstorage_tsstore/brick_config.yaml b/src/arduino/app_bricks/dbstorage_tsstore/brick_config.yaml index 8258cf13..6ceb5d76 100644 --- a/src/arduino/app_bricks/dbstorage_tsstore/brick_config.yaml +++ b/src/arduino/app_bricks/dbstorage_tsstore/brick_config.yaml @@ -2,4 +2,17 @@ id: arduino:dbstorage_tsstore name: Database - Time Series description: "Simplified time series database storage layer for Arduino sensor samples built on top of InfluxDB." requires_container: true -category: storage \ No newline at end of file +category: storage +variables: +- name: DB_USERNAME + description: Database username + default_value: admin +- name: DB_PASSWORD + description: Database password + default_value: Arduino15 +- name: INFLUXDB_ADMIN_TOKEN + description: InfluxDB admin token + default_value: 392edbf2-b8a2-481f-979d-3f188b2c05f0 +- name: BIND_ADDRESS + description: External container address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/image_classification/brick_compose.yaml b/src/arduino/app_bricks/image_classification/brick_compose.yaml index fe20b37e..03e84a02 100644 --- a/src/arduino/app_bricks/image_classification/brick_compose.yaml +++ b/src/arduino/app_bricks/image_classification/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_CLASSIFICATION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-classification-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/image_classification/brick_config.yaml b/src/arduino/app_bricks/image_classification/brick_config.yaml index a26273b4..a8627971 100644 --- a/src/arduino/app_bricks/image_classification/brick_config.yaml +++ b/src/arduino/app_bricks/image_classification/brick_config.yaml @@ -9,3 +9,13 @@ requires_model: true model: mobilenet-image-classification model_configuration_variables: - EI_CLASSIFICATION_MODEL +variables: +- name: EI_CLASSIFICATION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/keyword_spotting/brick_compose.yaml b/src/arduino/app_bricks/keyword_spotting/brick_compose.yaml index 4340871e..a47f0bf4 100644 --- a/src/arduino/app_bricks/keyword_spotting/brick_compose.yaml +++ b/src/arduino/app_bricks/keyword_spotting/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_KEYWORD_SPOTTING_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-keyword-spot-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/keyword_spotting/brick_config.yaml b/src/arduino/app_bricks/keyword_spotting/brick_config.yaml index b5e2875e..93daf70f 100644 --- a/src/arduino/app_bricks/keyword_spotting/brick_config.yaml +++ b/src/arduino/app_bricks/keyword_spotting/brick_config.yaml @@ -11,3 +11,13 @@ requires_model: true model: keyword-spotting-hey-arduino model_configuration_variables: - EI_KEYWORD_SPOTTING_MODEL +variables: +- name: EI_KEYWORD_SPOTTING_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/motion_detection/brick_compose.yaml b/src/arduino/app_bricks/motion_detection/brick_compose.yaml index abc10e77..92ff7ebe 100644 --- a/src/arduino/app_bricks/motion_detection/brick_compose.yaml +++ b/src/arduino/app_bricks/motion_detection/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_MOTION_DETECTION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-motion-detection-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/motion_detection/brick_config.yaml b/src/arduino/app_bricks/motion_detection/brick_config.yaml index 86160c49..ad10efd6 100644 --- a/src/arduino/app_bricks/motion_detection/brick_config.yaml +++ b/src/arduino/app_bricks/motion_detection/brick_config.yaml @@ -9,3 +9,13 @@ requires_model: true model: updown-wave-motion-detection model_configuration_variables: - EI_MOTION_DETECTION_MODEL +variables: +- name: EI_MOTION_DETECTION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/object_detection/brick_compose.yaml b/src/arduino/app_bricks/object_detection/brick_compose.yaml index 99871411..80ebc4bb 100644 --- a/src/arduino/app_bricks/object_detection/brick_compose.yaml +++ b/src/arduino/app_bricks/object_detection/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_OBJ_DETECTION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-detection-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 @@ -22,3 +20,4 @@ services: interval: 2s timeout: 2s retries: 25 + \ No newline at end of file diff --git a/src/arduino/app_bricks/object_detection/brick_config.yaml b/src/arduino/app_bricks/object_detection/brick_config.yaml index e5a96ce5..20e19907 100644 --- a/src/arduino/app_bricks/object_detection/brick_config.yaml +++ b/src/arduino/app_bricks/object_detection/brick_config.yaml @@ -8,4 +8,14 @@ requires_container: true requires_model: true model: yolox-object-detection model_configuration_variables: - - EI_OBJ_DETECTION_MODEL \ No newline at end of file + - EI_OBJ_DETECTION_MODEL +variables: +- name: EI_OBJ_DETECTION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml b/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml index 3dd8139a..a25f6f87 100644 --- a/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml +++ b/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_CLASSIFICATION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-classification-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/video_imageclassification/brick_config.yaml b/src/arduino/app_bricks/video_imageclassification/brick_config.yaml index 0517c457..a458c5ef 100644 --- a/src/arduino/app_bricks/video_imageclassification/brick_config.yaml +++ b/src/arduino/app_bricks/video_imageclassification/brick_config.yaml @@ -13,4 +13,14 @@ required_devices: - camera model: mobilenet-image-classification model_configuration_variables: - - EI_CLASSIFICATION_MODEL \ No newline at end of file + - EI_CLASSIFICATION_MODEL +variables: +- name: EI_V_CLASSIFICATION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml b/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml index 804bc638..9dbb74ca 100644 --- a/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml +++ b/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_OBJ_DETECTION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-video-obj-detection-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/video_objectdetection/brick_config.yaml b/src/arduino/app_bricks/video_objectdetection/brick_config.yaml index 66b297ee..5c702e9c 100644 --- a/src/arduino/app_bricks/video_objectdetection/brick_config.yaml +++ b/src/arduino/app_bricks/video_objectdetection/brick_config.yaml @@ -12,4 +12,14 @@ required_devices: - camera model: yolox-object-detection model_configuration_variables: - - EI_OBJ_DETECTION_MODEL \ No newline at end of file + - EI_OBJ_DETECTION_MODEL +variables: +- name: EI_V_OBJ_DETECTION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/visual_anomaly_detection/brick_compose.yaml b/src/arduino/app_bricks/visual_anomaly_detection/brick_compose.yaml index ced99fcb..50cc1f40 100644 --- a/src/arduino/app_bricks/visual_anomaly_detection/brick_compose.yaml +++ b/src/arduino/app_bricks/visual_anomaly_detection/brick_compose.yaml @@ -1,5 +1,3 @@ -# EI_V_ANOMALY_DETECTION_MODEL = path to the model file -# CUSTOM_MODEL_PATH = path to the custom model directory services: ei-obj-video-anomalies-det-runner: image: ${DOCKER_REGISTRY_BASE:-ghcr.io/arduino/}app-bricks/ei-models-runner:0.6.0 diff --git a/src/arduino/app_bricks/visual_anomaly_detection/brick_config.yaml b/src/arduino/app_bricks/visual_anomaly_detection/brick_config.yaml index 2920b52f..8710edca 100644 --- a/src/arduino/app_bricks/visual_anomaly_detection/brick_config.yaml +++ b/src/arduino/app_bricks/visual_anomaly_detection/brick_config.yaml @@ -9,3 +9,13 @@ requires_model: true model: concrete-crack-anomaly-detection model_configuration_variables: - EI_V_ANOMALY_DETECTION_MODEL +variables: +- name: EI_V_ANOMALY_DETECTION_MODEL + description: Path to the model file + hidden: true +- name: CUSTOM_MODEL_PATH + description: Path to the custom model directory + hidden: true +- name: BIND_ADDRESS + description: Bind address + hidden: true \ No newline at end of file From da2fa00d6af8748d1368db68f4e1e279956d3f12 Mon Sep 17 00:00:00 2001 From: Mirko Curtolo Date: Fri, 5 Dec 2025 16:40:22 +0100 Subject: [PATCH 2/2] Fix video examples variables --- .../video_imageclassification/brick_compose.yaml | 2 +- .../app_bricks/video_imageclassification/brick_config.yaml | 7 +++++-- .../app_bricks/video_objectdetection/brick_compose.yaml | 2 +- .../app_bricks/video_objectdetection/brick_config.yaml | 7 +++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml b/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml index a25f6f87..9bfcab33 100644 --- a/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml +++ b/src/arduino/app_bricks/video_imageclassification/brick_compose.yaml @@ -11,7 +11,7 @@ services: volumes: - "${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}:${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}" - "/run/udev:/run/udev" - command: ["--model-file", "${EI_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"] + command: ["--model-file", "${EI_V_CLASSIFICATION_MODEL:-/models/ootb/ei/mobilenet-v2-224px.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"] healthcheck: test: [ "CMD-SHELL", "wget -q --spider http://ei-video-classification-runner:4912 || exit 1" ] interval: 2s diff --git a/src/arduino/app_bricks/video_imageclassification/brick_config.yaml b/src/arduino/app_bricks/video_imageclassification/brick_config.yaml index a458c5ef..4dec5d91 100644 --- a/src/arduino/app_bricks/video_imageclassification/brick_config.yaml +++ b/src/arduino/app_bricks/video_imageclassification/brick_config.yaml @@ -13,7 +13,7 @@ required_devices: - camera model: mobilenet-image-classification model_configuration_variables: - - EI_CLASSIFICATION_MODEL + - EI_V_CLASSIFICATION_MODEL variables: - name: EI_V_CLASSIFICATION_MODEL description: Path to the model file @@ -23,4 +23,7 @@ variables: hidden: true - name: BIND_ADDRESS description: Bind address - hidden: true \ No newline at end of file + hidden: true +- name: VIDEO_DEVICE + description: Video device path + hidden: true \ No newline at end of file diff --git a/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml b/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml index 9dbb74ca..393491d5 100644 --- a/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml +++ b/src/arduino/app_bricks/video_objectdetection/brick_compose.yaml @@ -11,7 +11,7 @@ services: volumes: - "${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}:${CUSTOM_MODEL_PATH:-/home/arduino/.arduino-bricks/ei-models/}" - "/run/udev:/run/udev" - command: ["--model-file", "${EI_OBJ_DETECTION_MODEL:-/models/ootb/ei/yolo-x-nano.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"] + command: ["--model-file", "${EI_V_OBJ_DETECTION_MODEL:-/models/ootb/ei/yolo-x-nano.eim}", "--dont-print-predictions", "--mode", "streaming", "--preview-original-resolution", "--camera", "${VIDEO_DEVICE:-/dev/video1}"] healthcheck: test: [ "CMD-SHELL", "wget -q --spider http://ei-video-obj-detection-runner:4912 || exit 1" ] interval: 2s diff --git a/src/arduino/app_bricks/video_objectdetection/brick_config.yaml b/src/arduino/app_bricks/video_objectdetection/brick_config.yaml index 5c702e9c..d3818d6a 100644 --- a/src/arduino/app_bricks/video_objectdetection/brick_config.yaml +++ b/src/arduino/app_bricks/video_objectdetection/brick_config.yaml @@ -12,7 +12,7 @@ required_devices: - camera model: yolox-object-detection model_configuration_variables: - - EI_OBJ_DETECTION_MODEL + - EI_V_OBJ_DETECTION_MODEL variables: - name: EI_V_OBJ_DETECTION_MODEL description: Path to the model file @@ -22,4 +22,7 @@ variables: hidden: true - name: BIND_ADDRESS description: Bind address - hidden: true \ No newline at end of file + hidden: true +- name: VIDEO_DEVICE + description: Video device path + hidden: true \ No newline at end of file