Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 12 additions & 12 deletions .github/workflows/ci_edge_camera.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI edge_camera
run-name: edge_camera CI on branch >> ${{ github.ref_name }} <<
name: CI edge-camera
run-name: edge-camera CI on branch >> ${{ github.ref_name }} <<

on:
workflow_dispatch:
Expand All @@ -8,7 +8,7 @@ on:
- main
pull_request:
paths:
- "edge_camera/**"
- "edge/camera/**"

jobs:
lint_and_test_on_edge_camera:
Expand All @@ -19,32 +19,32 @@ jobs:
contents: read
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "latest"

- name: Install dependencies
run: make install
working-directory: ./edge_camera
working-directory: ./edge/camera

- name: Lint with flake8 and black
- name: Lint with ruff
run: make check
working-directory: ./edge_camera
working-directory: ./edge/camera

- name: Run unit tests
run: make unit_tests
working-directory: ./edge_camera
working-directory: ./edge/camera

- name: Upload unit test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Unit tests report in Python ${{ matrix.python-version }}
path: edge_camera/reports/pytest/unit-tests-report.xml
path: edge/camera/reports/pytest/unit-tests-report.xml
reporter: java-junit
8 changes: 2 additions & 6 deletions .github/workflows/ci_edge_interface.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: CI edge_interface
run-name: edge_interface CI on branch >> ${{ github.ref_name }} <<

# edge_interface is archived — replaced by edge/cockpit (Vue 3, pending).
# This workflow is disabled until edge/cockpit CI is set up.
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- 'edge_interface/**'


jobs:
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/ci_edge_model_serving.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI edge_model_serving
run-name: edge_model_serving CI on branch >> ${{ github.ref_name }} <<
name: CI edge-model-server
run-name: edge-model-server CI on branch >> ${{ github.ref_name }} <<

on:
workflow_dispatch:
Expand All @@ -8,42 +8,42 @@ on:
- main
pull_request:
paths:
- "edge_model_serving/**"
- "edge/model_serving/**"

jobs:
lint_and_test_on_edge_model_serving:
name: Run Python linter and tests (unit > integration > functional)
name: Run Python linter and tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "latest"

- name: Install dependencies
run: make install
working-directory: ./edge_model_serving/tflite_serving
working-directory: ./edge/model_serving/tflite_serving

- name: Lint with flake8 and black
- name: Lint with ruff
run: make check
working-directory: ./edge_model_serving/tflite_serving
working-directory: ./edge/model_serving/tflite_serving

- name: Run unit tests
run: make tflite_tests
working-directory: ./edge_model_serving/tflite_serving
working-directory: ./edge/model_serving/tflite_serving

- name: Upload unit test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Unit tests report in Python ${{ matrix.python-version }}
path: edge_model_serving/tflite_serving/reports/tests-report.xml
path: edge/model_serving/tflite_serving/reports/tests-report.xml
reporter: java-junit

build_and_push_images:
Expand All @@ -52,9 +52,9 @@ jobs:
fail-fast: false
matrix:
include:
- dockerfile: ./edge_model_serving/tflite_serving/Dockerfile
- dockerfile: ./edge/model_serving/tflite_serving/Dockerfile
image: ghcr.io/${{ github.repository }}/edge_tflite_serving
context: ./edge_model_serving
context: ./edge/model_serving
uses: ./.github/workflows/template_build_and_push_docker_images.yml
with:
context: ${{ matrix.context }}
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/ci_edge_orchestrator.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI edge_orchestrator
run-name: edge_orchestrator CI on branch >> ${{ github.ref_name }} <<
name: CI edge-orchestrator
run-name: edge-orchestrator CI on branch >> ${{ github.ref_name }} <<

on:
workflow_dispatch:
Expand All @@ -8,7 +8,7 @@ on:
- main
pull_request:
paths:
- "edge_orchestrator/**"
- "edge/orchestrator/**"

jobs:
lint_and_test_on_edge_orchestrator:
Expand All @@ -20,7 +20,7 @@ jobs:
packages: read
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.11"]
services:
edge_tflite_serving:
image: ghcr.io/octo-technology/vio/edge_tflite_serving:main
Expand All @@ -34,28 +34,29 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
version: "latest"

- name: Install dependencies
run: make install
working-directory: ./edge_orchestrator
working-directory: ./edge/orchestrator

- name: Lint with flake8 and black
- name: Lint with ruff
run: make check
working-directory: ./edge_orchestrator
working-directory: ./edge/orchestrator

- name: Run unit tests
run: make unit_tests
working-directory: ./edge_orchestrator
working-directory: ./edge/orchestrator

- name: Upload unit test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Unit tests report in Python ${{ matrix.python-version }}
path: edge_orchestrator/reports/pytest/unit-tests-report.xml
path: edge/orchestrator/reports/pytest/unit-tests-report.xml
reporter: java-junit

- name: Wait for edge_tflite_serving to be ready
Expand All @@ -77,26 +78,26 @@ jobs:

- name: Run integration tests
run: make integration_tests
working-directory: ./edge_orchestrator
working-directory: ./edge/orchestrator

- name: Upload integration test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Integration tests report in Python ${{ matrix.python-version }}
path: edge_orchestrator/reports/pytest/integration-tests-report.xml
path: edge/orchestrator/reports/pytest/integration-tests-report.xml
reporter: java-junit

- name: Run functional tests
run: make functional_tests
working-directory: ./edge_orchestrator
working-directory: ./edge/orchestrator

- name: Upload functional test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Functional tests report in Python ${{ matrix.python-version }}
path: edge_orchestrator/reports/behave/*.xml
path: edge/orchestrator/reports/behave/*.xml
reporter: java-junit

build_and_push_images:
Expand All @@ -105,9 +106,9 @@ jobs:
fail-fast: false
matrix:
include:
- dockerfile: ./edge_orchestrator/Dockerfile
- dockerfile: ./edge/orchestrator/Dockerfile
image: ghcr.io/${{ github.repository }}/edge_orchestrator
context: ./edge_orchestrator
context: ./edge/orchestrator
uses: ./.github/workflows/template_build_and_push_docker_images.yml
with:
context: ${{ matrix.context }}
Expand Down
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ grafvio_id_rsa
*.tfstate
*.tfstate.*

edge_model_serving/models/**/*.tflite
edge_orchestrator/data_storage/*
edge_orchestrator/data/storage/*
edge_orchestrator/config/secrets
edge_orchestrator/fake_images/*
/deployment/edge/images/
edge/model_serving/models/**/*.tflite
edge/orchestrator/data_storage/*
edge/orchestrator/data/storage/*
edge/orchestrator/config/secrets
edge/orchestrator/fake_images/*
hub/deployment/edge/images/
*package-lock.json

hub_streamlit/config/secrets
hub/streamlit/config/secrets
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ edge_model_serving:
edge_orchestrator:
BUILDOS=${BUILDOS} docker compose up -d --build edge_orchestrator

.PHONY: edge_interface ## 📸 Start edge_interface inside a docker container
edge_interface:
BUILDOS=${BUILDOS} docker compose up -d --build edge_interface
.PHONY: edge_cockpit ## 🖥 Start edge_cockpit inside a docker container
edge_cockpit:
BUILDOS=${BUILDOS} docker compose up -d --build edge_cockpit

.PHONY: hub_streamlit ## 🚀 Start hub_streamlit inside a docker container
hub_streamlit:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
58 changes: 19 additions & 39 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,32 @@
services:
edge_model_serving:
extends:
file: edge_model_serving/tflite_serving/edge_model_serving.yml
file: edge/model_serving/tflite_serving/edge_model_serving.yml
service: edge_model_serving

edge_orchestrator:
extends:
file: edge_orchestrator/edge_orchestrator.yml
file: edge/orchestrator/edge_orchestrator.yml
service: edge_orchestrator

hub_labelizer:
container_name: hub_labelizer
build:
context: hub_labelizer
dockerfile: Dockerfile
volumes:
- ./edge_orchestrator/data:/edge_orchestrator/data
ports:
- 8100:8100
environment:
API_CONFIG: docker
EDGE_ORCHESTRATOR_URL: http://edge_orchestrator:8000
profiles: [hub]
edge_camera:
extends:
file: edge/camera/edge_camera.yml
service: edge_camera

edge_interface:
edge_cockpit:
extends:
file: edge_interface/edge_interface.yml
service: edge_interface
file: edge/cockpit/edge_cockpit.yml
service: edge_cockpit
depends_on:
- edge_orchestrator

hub_streamlit:
container_name: hub_streamlit
build:
context: hub_streamlit
dockerfile: Dockerfile
ports:
- 8500:8500
environment:
BUCKET_NAME: tf-vio-bucket
GOOGLE_APPLICATION_CREDENTIALS: /hub_streamlit/config/secrets/credentials.json
volumes:
- ./hub_streamlit/config:/hub_streamlit/config
profiles: [hub]
hub_labelizer:
extends:
file: hub/labelizer/hub_labelizer.yml
service: hub_labelizer

edge_streamlit:
container_name: edge_streamlit
build:
context: edge_streamlit
dockerfile: Dockerfile
ports:
- 8502:8502
profiles: [edge]
hub_streamlit:
extends:
file: hub/streamlit/hub_streamlit.yml
service: hub_streamlit
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions edge/camera/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG PYTHON_VERSION="3.11"

FROM --platform=$TARGETPLATFORM python:${PYTHON_VERSION}-slim-bookworm

WORKDIR /edge_camera

COPY pyproject.toml ./
RUN pip install --no-cache-dir uv && uv pip install --system -e "."

COPY src/ ./src/

EXPOSE 8001
CMD ["uvicorn", "edge_camera.interface.api.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "8001"]
Loading
Loading