dora-rs / dora

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.5k stars 79 forks source link

Nodes hub to store and reuse commonly used node #569

Closed haixuanTao closed 2 months ago

haixuanTao commented 3 months ago

This PR creates a node hub to store commonly used nodes so that we can make it extremely easy for people to get started with dora.

Hennzau commented 2 months ago

I'm currently working on this PR on the latest version of Dora (0.3.5), so I bumped it from rc0 to release.

Structure

Each python node respects the following structure:

node-hub/
└── node/
    ├── main.py
    ├── README.mdr
    └── pyproject.toml

The pyproject.toml can be installed with pip (pip install node-hub/node), it installs all dependencies and setup a script to directly execute the node from a python env:

  - id: object-detection
    build: pip install ../../node-hub/ultralytics-yolo
    path: ultralytics-yolo

Usage

cd examples/python-dataflow
dora build ./dataflow.yml (or dora build ./dataflow_dynamic.yml)
dora up
dora start ./dataflow.yml (or dora start ./dataflow_dynamic.yml)

Note: if you're running the dynamic dataflow, you will need to start manually the ultralytics-yolo node:

# activate your virtual environment in another terminal
python ultralytics-yolo --name object-detection --model yolov5n.pt