Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
464bf52
Update docker-compose.yml
nee1k Mar 14, 2024
80f5a0a
Allow motion stream connections from other hosts
khsa1 Oct 9, 2025
c792122
export image detecting port 8081
khsa1 Oct 9, 2025
deefe82
Add health check for image detecting plugin
khsa1 Oct 17, 2025
19a76db
Pass bounding boxes from image_scoring to oracle through even ctevent…
khsa1 Oct 23, 2025
7d372f9
Update default ckn broker location
khsa1 Oct 23, 2025
a5749d3
Update rust version in engine image
khsa1 Oct 23, 2025
c82cf59
Add missing BoundingBox.py
khsa1 Oct 24, 2025
2e17f75
Fix bug when parsing ground truth files from custom url
khsa1 Oct 24, 2025
26d67de
update ground truth bboxes of example images
khsa1 Oct 27, 2025
4d6d85e
Send generated image count from image_detecting to detection_reporter…
khsa1 Nov 26, 2025
4051f5e
Record power metrics for newer plugins
khsa1 Nov 26, 2025
5ff10b4
Split power plugin gha job into two jobs
khsa1 Dec 1, 2025
9862f1c
Only copy over release directory from scaphandre image
khsa1 Dec 1, 2025
9b328f6
Add CKN plugin: update Makefile, README, and add plugin files
nee1k Dec 10, 2025
8c1c63f
Merge branch 'main' of https://github.com/nee1k/camera-traps
nee1k Dec 10, 2025
135dc4e
Merge branch 'dev' into main
nee1k Dec 10, 2025
587e604
Merge pull request #61 from nee1k/main
khsa1 Dec 10, 2025
29c5057
Fix condition check in Docker workflow for test execution
nee1k Dec 11, 2025
db4037d
Merge pull request #62 from nee1k/gh-event-check
nee1k Dec 11, 2025
b9efbf3
Rename oracle plugin to ckn plugin in GHA
khsa1 Dec 15, 2025
0fcd5c9
ckn plugin fix for video simulation
khsa1 Dec 17, 2025
c3b3e47
Fix CKN power summary processing without power_processor
nee1k Jan 15, 2026
bb4de25
Merge pull request #63 from nee1k/gh-event-check
nee1k Jan 16, 2026
e787d07
Fix power monitoring streaming and merge daemon metrics into ckn_plugin
nee1k Jan 26, 2026
586416b
Merge pull request #64 from nee1k/fix/power-monitoring-and-metrics-merge
nee1k Jan 26, 2026
a7a7789
Merge branch 'main' of https://github.com/nee1k/camera-traps
nee1k Jan 26, 2026
048ddf8
Merge main into ckn_plugin branch
nee1k Jan 26, 2026
e942c16
Install watchdog into ckn plugin image
khsa1 Jan 28, 2026
1b91171
Merge branch 'ckn_plugin' of https://github.com/tapis-project/camera-…
khsa1 Jan 29, 2026
9cdd86e
WIP: Fixes to enable ckn for video simulations
khsa1 Jan 29, 2026
3aaa9ab
Refactor ckn_plugin: replace file-based state with in-memory tracking
nee1k Feb 1, 2026
617ec49
Add default domain field to ckn events
khsa1 May 19, 2026
b885e0d
Wrap CKN Kafka events in Connect schema envelopes and fix power-summa…
nee1k Jul 15, 2026
2a3a817
Add self-contained e2e test runner for the CKN streaming pipeline
nee1k Jul 15, 2026
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
61 changes: 39 additions & 22 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push oracle_plugin
- name: Build and push ckn_plugin
uses: docker/build-push-action@v5
with:
context: external_plugins/image_detecting_plugin
Expand All @@ -597,23 +597,11 @@ jobs:
tags: tapis/image_detecting_plugin:${{ env.TRAPS_REL }}
build-args: REL=${{ env.TRAPS_REL }}

power_measuring_plugin:
power_measuring_plugin_deps:
runs-on: ubuntu-latest
environment: main
needs: camera_traps_py_313
steps:
- name: Set TRAPS_REL
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
TRAPS_REL=${{ inputs.release_tag }}
elif [[ ${{ github.event_name == 'push' }} == true ]]; then
TRAPS_REL=latest
elif [[ ${{ github.event_name == 'pull_request' }} == true ]]; then
TRAPS_REL=latest
else
TRAPS_REL=${{ github.event.release.tag_name }}
fi
echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
Expand Down Expand Up @@ -641,6 +629,35 @@ jobs:
file: external_plugins/power_measuring_plugin/Dockerfile-scaphandre
platforms: linux/amd64,linux/arm64
tags: tapis/scaphandre

power_measuring_plugin:
runs-on: ubuntu-latest
environment: main
needs: power_measuring_plugin_deps
steps:
- name: Set TRAPS_REL
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
TRAPS_REL=${{ inputs.release_tag }}
elif [[ ${{ github.event_name == 'push' }} == true ]]; then
TRAPS_REL=latest
elif [[ ${{ github.event_name == 'pull_request' }} == true ]]; then
TRAPS_REL=latest
else
TRAPS_REL=${{ github.event.release.tag_name }}
fi
echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push power_measuring_plugin
uses: docker/build-push-action@v5
with:
Expand All @@ -650,7 +667,7 @@ jobs:
tags: tapis/power_measuring_plugin_py:${{ env.TRAPS_REL }}
build-args: REL=${{ env.TRAPS_REL }}

oracle_plugin:
ckn_plugin:
runs-on: ubuntu-latest
environment: main
needs: camera_traps_py_313
Expand Down Expand Up @@ -678,13 +695,13 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push oracle_plugin
- name: Build and push ckn_plugin
uses: docker/build-push-action@v5
with:
context: external_plugins/oracle_plugin
context: external_plugins/ckn_plugin
platforms: linux/amd64,linux/arm64
push: true
tags: tapis/oracle_plugin:${{ env.TRAPS_REL }}
tags: tapis/ckn_plugin:${{ env.TRAPS_REL }}
build-args: REL=${{ env.TRAPS_REL }}

detection_reporter_plugin:
Expand Down Expand Up @@ -715,7 +732,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push oracle_plugin
- name: Build and push ckn_plugin
uses: docker/build-push-action@v5
with:
context: external_plugins/detection_reporter_plugin
Expand Down Expand Up @@ -752,7 +769,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push oracle_plugin
- name: Build and push ckn_plugin
uses: docker/build-push-action@v5
with:
context: external_plugins/video_generating_plugin
Expand Down Expand Up @@ -822,11 +839,11 @@ jobs:
trigger_tests:
runs-on: ubuntu-latest
environment: main
needs: [engine, image_scoring_plugin_server_py_313, image_scoring_plugin_ultralytics_py_313, image_scoring_plugin_yolov5_py_38, image_scoring_plugin_py_nano_38, image_generating_plugin, image_detecting_plugin, power_measuring_plugin, oracle_plugin, detection_reporter_plugin, video_generating_plugin, custom_install]
needs: [engine, image_scoring_plugin_server_py_313, image_scoring_plugin_ultralytics_py_313, image_scoring_plugin_yolov5_py_38, image_scoring_plugin_py_nano_38, image_generating_plugin, image_detecting_plugin, power_measuring_plugin_deps, power_measuring_plugin, ckn_plugin, detection_reporter_plugin, video_generating_plugin, custom_install]
steps:
- name: Check if tests are disabled
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]] && [ "${{ inputs.run_tests }}" == "false" ];
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]] && [ "${{ inputs.run_tests }}" == "false" ];
then
echo "Tests are disabled"
exit 1
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# -------------------
# First build phase: In this phase we do the build for release with an intermedidate layer that caches the dependencies
# --------------------
FROM rust:1.75 as builder
FROM rust:1.90 as builder

# install libzmq
RUN USER=root apt-get update && apt-get install -y libzmq3-dev
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Example: 'make build' builds all targets.

clean:
cd releases/${TRAPS_REL}; rm -rf power_output_dir/*; rm -rf images_output_dir/*; rm -rf oracle_plugin_dir/*;
cd releases/${TRAPS_REL}; rm -rf power_output_dir/*; rm -rf images_output_dir/*; rm -rf ckn_plugin_dir/*;

build-engine:
docker build -t tapis/camera_traps_engine:${TRAPS_REL} --build-arg TRAPS_REL=${TRAPS_REL} .
Expand Down Expand Up @@ -47,8 +47,8 @@ build-generating:
build-power:
cd external_plugins/power_measuring_plugin/ && docker build -t tapis/powerjoular -f Dockerfile-powerjoular . && docker build -t tapis/scaphandre -f Dockerfile-scaphandre . && docker build -t tapis/power_measuring_plugin_py:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..

build-oracle:
cd external_plugins/oracle_plugin/ && docker build -t tapis/oracle_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
build-ckn:
cd external_plugins/ckn_plugin/ && docker build -t tapis/ckn_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..

build-detection:
cd external_plugins/detection_reporter_plugin && docker build -t tapis/detection_reporter_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
Expand All @@ -59,18 +59,18 @@ build-detecting:
build-video:
cd external_plugins/video_generating_plugin/ && docker build -t tapis/video_generating_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..

build-py-plugins: build-camerapy build-scoring-server build-generating build-power build-oracle build-detection build-detecting build-video
build-py-plugins: build-camerapy build-scoring-server build-generating build-power build-ckn build-detection build-detecting build-video

build-installer:
cd installer && docker build -t tapis/camera-traps-installer:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../

build: build-engine build-py-plugins build-installer

tag: build
docker tag tapis/camera_traps_py:${TRAPS_REL} tapis/camera_traps_py & docker tag tapis/camera_traps_py_3.8:${TRAPS_REL} tapis/camera_traps_py_3.8 & docker tag tapis/image_scoring_plugin_py_3.8:${TRAPS_REL} tapis/image_scoring_plugin_py_3.8 & docker tag tapis/image_scoring_plugin_py_nano_3.8:${TRAPS_REL} tapis/image_scoring_plugin_py_nano_3.8 & docker tag tapis/image_generating_plugin_py:${TRAPS_REL} tapis/image_generating_plugin_py & docker tag tapis/power_measuring_plugin_py:${TRAPS_REL} tapis/power_measuring_plugin_py & docker tag tapis/camera_traps_engine:${TRAPS_REL} tapis/camera_traps_engine & docker tag tapis/oracle_plugin:${TRAPS_REL} tapis/oracle_plugin & docker tag tapis/camera-traps-installer:${TRAPS_REL} tapis/camera-traps-installer
docker tag tapis/camera_traps_py:${TRAPS_REL} tapis/camera_traps_py & docker tag tapis/camera_traps_py_3.8:${TRAPS_REL} tapis/camera_traps_py_3.8 & docker tag tapis/image_scoring_plugin_py_3.8:${TRAPS_REL} tapis/image_scoring_plugin_py_3.8 & docker tag tapis/image_scoring_plugin_py_nano_3.8:${TRAPS_REL} tapis/image_scoring_plugin_py_nano_3.8 & docker tag tapis/image_generating_plugin_py:${TRAPS_REL} tapis/image_generating_plugin_py & docker tag tapis/power_measuring_plugin_py:${TRAPS_REL} tapis/power_measuring_plugin_py & docker tag tapis/camera_traps_engine:${TRAPS_REL} tapis/camera_traps_engine & docker tag tapis/ckn_plugin:${TRAPS_REL} tapis/ckn_plugin & docker tag tapis/camera-traps-installer:${TRAPS_REL} tapis/camera-traps-installer

push: tag
docker push tapis/camera_traps_py & docker push tapis/camera_traps_py:${TRAPS_REL} & docker push tapis/camera_traps_py_3.8 & docker push tapis/camera_traps_py_3.8:${TRAPS_REL} & docker push tapis/image_scoring_plugin_py_3.8 & docker push tapis/image_scoring_plugin_py_3.8:${TRAPS_REL} & docker push tapis/image_scoring_plugin_py_nano_3.8 & docker push tapis/image_scoring_plugin_py_nano_3.8:${TRAPS_REL} & docker push tapis/image_generating_plugin_py & docker push tapis/image_generating_plugin_py:${TRAPS_REL} & docker push tapis/power_measuring_plugin_py:${TRAPS_REL} & docker push tapis/oracle_plugin:${TRAPS_REL} & docker push tapis/camera_traps_engine & docker push tapis/camera_traps_engine:${TRAPS_REL} & docker push tapis/camera-traps-installer:${TRAPS_REL} & docker push tapis/camera-traps-installer
docker push tapis/camera_traps_py & docker push tapis/camera_traps_py:${TRAPS_REL} & docker push tapis/camera_traps_py_3.8 & docker push tapis/camera_traps_py_3.8:${TRAPS_REL} & docker push tapis/image_scoring_plugin_py_3.8 & docker push tapis/image_scoring_plugin_py_3.8:${TRAPS_REL} & docker push tapis/image_scoring_plugin_py_nano_3.8 & docker push tapis/image_scoring_plugin_py_nano_3.8:${TRAPS_REL} & docker push tapis/image_generating_plugin_py & docker push tapis/image_generating_plugin_py:${TRAPS_REL} & docker push tapis/power_measuring_plugin_py:${TRAPS_REL} & docker push tapis/ckn_plugin:${TRAPS_REL} & docker push tapis/camera_traps_engine & docker push tapis/camera_traps_engine:${TRAPS_REL} & docker push tapis/camera-traps-installer:${TRAPS_REL} & docker push tapis/camera-traps-installer

push-all:
docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/camera_traps_engine:${TRAPS_REL} --build-arg TRAPS_REL=${TRAPS_REL} .
Expand All @@ -79,5 +79,5 @@ push-all:
cd external_plugins/image_scoring_plugin/ && docker buildx build --platform linux/arm64 -t tapis/image_scoring_plugin_py_nano_3.8:${TRAPS_REL} --build-arg REL=${TRAPS_REL} -f Dockerfile-3.8-nano .; cd ../..
cd external_plugins/image_generating_plugin/ && docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/image_generating_plugin_py:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
cd external_plugins/power_measuring_plugin/ && docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/power_measuring_plugin_py:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
cd external_plugins/oracle_plugin/ && docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/oracle_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
cd external_plugins/ckn_plugin/ && docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/ckn_plugin:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../..
cd installer && docker buildx build --platform linux/arm64,linux/amd64 --push -t tapis/camera-traps-installer:${TRAPS_REL} --build-arg REL=${TRAPS_REL} .; cd ../
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In general, plugins can also depend on their own environment variables and/or co
| detection_reporter_plugin| TRAPS_DETECTION_REPORTER_* | /traps-detection.toml |
| image_store_plugin | TRAPS_IMAGE_STORE_FILE | ~/traps-image-store.toml | |
| power_measure_plugin | TRAPS_POWER_LOG_PATH | ~/logs | |
| oracle_monitor_plugin | TRAPS_ORACLE_OUTPUT_PATH | ~/output | |
| ckn_plugin | TRAPS_CKN_OUTPUT_PATH | ~/output | |
| integration tests | TRAPS_INTEGRATION_CONFIG_FILE | ~/traps-integration.toml | |
| logger | TRAPS_LOG4RS_CONFIG_FILE | resources/log4rs.yml | Packaged with application |

Expand Down Expand Up @@ -123,7 +123,7 @@ Camera-traps uses a [TOML](https://toml.io/en/) file to configure the internal a
> "PluginTerminateEvent"<br>
> ]<br>
> [[plugins.external]]<br>
> plugin_name = "ext_oracle_monitor_plugin"<br>
> plugin_name = "ext_ckn_plugin"<br>
> id = "6e153711-9823-4ee6-b608-58e2e801db51"<br>
> external_port = 6011<br>
> subscriptions = [<br>
Expand Down
12 changes: 12 additions & 0 deletions external_plugins/ckn_plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG REL=use-build-arg
FROM tapis/camera_traps_py_3.13:$REL
RUN find / -path /proc -prune -o -path /sys -prune -o -path /dev -prune -o -writable -print0 | xargs -0 -P $(nproc) -I {} chmod 0777 {} || true

# Install confluent-kafka for Kafka streaming
RUN pip install --no-cache-dir confluent-kafka

ADD ckn_plugin.py /ckn_plugin.py
ADD power_processor.py /power_processor.py
RUN chmod -R 0777 /ckn_plugin.py /power_processor.py || true

ENTRYPOINT [ "python", "-u", "/ckn_plugin.py" ]
Loading