Browse Source

Fixup example

tags/v0.3.6
haixuanTao 1 year ago
parent
commit
32fd38dcb2
6 changed files with 23 additions and 126 deletions
  1. +12
    -0
      examples/echo/README.md
  2. +4
    -36
      examples/pyarrow-test/README.md
  3. +7
    -36
      examples/speech-to-text/README.md
  4. +0
    -1
      examples/terminal-dataflow/.gitignore
  5. +0
    -41
      examples/terminal-dataflow/README.md
  6. +0
    -12
      examples/terminal-dataflow/dataflow.yml

+ 12
- 0
examples/echo/README.md View File

@@ -0,0 +1,12 @@
# Dora echo example

Make sure to have, dora, pip and cargo installed.

```bash
dora up
dora build dataflow.yml
dora start dataflow.yml

# In another terminal
terminal-input
```

+ 4
- 36
examples/pyarrow-test/README.md View File

@@ -1,41 +1,9 @@
# Python Dataflow Example
# Dora echo example

This examples shows how to create and connect dora nodes in Python.

## Overview

The [`dataflow.yml`](./dataflow.yml) defines a simple dataflow graph with the following three nodes:

- a webcam node, that connects to your webcam and feed the dataflow with webcam frame as jpeg compressed bytearray.
- a window plotting node, that will retrieve the webcam image and plot it.

The same dataflow is implemented for a `dynamic-node` in [`dataflow_dynamic.yml`](./dataflow_dynamic.yml). It contains
the same nodes as the previous dataflow, but the plot node is a dynamic node. See the next section for more
information on how to start such a dataflow.

## Getting started

After installing Rust, `dora-cli` and `Python >3.11`, you will need to **activate** (or create and **activate**) a
[Python virtual environment](https://docs.python.org/3/library/venv.html).
Then, you will need to install the dependencies:

```bash
cd examples/python-dataflow
dora build ./dataflow.yml (or dora build ./dataflow_dynamic.yml)
```

It will install the required dependencies for the Python nodes.

Then you can run the dataflow:
Make sure to have, dora, pip and cargo installed.

```bash
dora up
dora start ./dataflow.yml (or dora start ./dataflow_dynamic.yml)
dora build dataflow.yml
dora start dataflow.yml
```

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

```bash
# activate your virtual environment in another terminal
python opencv-plot --name plot
```

+ 7
- 36
examples/speech-to-text/README.md View File

@@ -1,41 +1,12 @@
# Python Dataflow Example
# Dora echo example

This examples shows how to create and connect dora nodes in Python.

## Overview

The [`dataflow.yml`](./dataflow.yml) defines a simple dataflow graph with the following three nodes:

- a webcam node, that connects to your webcam and feed the dataflow with webcam frame as jpeg compressed bytearray.
- a window plotting node, that will retrieve the webcam image and plot it.

The same dataflow is implemented for a `dynamic-node` in [`dataflow_dynamic.yml`](./dataflow_dynamic.yml). It contains
the same nodes as the previous dataflow, but the plot node is a dynamic node. See the next section for more
information on how to start such a dataflow.

## Getting started

After installing Rust, `dora-cli` and `Python >3.11`, you will need to **activate** (or create and **activate**) a
[Python virtual environment](https://docs.python.org/3/library/venv.html).
Then, you will need to install the dependencies:

```bash
cd examples/python-dataflow
dora build ./dataflow.yml (or dora build ./dataflow_dynamic.yml)
```

It will install the required dependencies for the Python nodes.

Then you can run the dataflow:
Make sure to have, dora, pip and cargo installed.

```bash
dora up
dora start ./dataflow.yml (or dora start ./dataflow_dynamic.yml)
```
dora build dataflow.yml
dora start dataflow.yml

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

```bash
# activate your virtual environment in another terminal
python opencv-plot --name plot
```
# In another terminal
terminal-print
```

+ 0
- 1
examples/terminal-dataflow/.gitignore View File

@@ -1 +0,0 @@
*.pt

+ 0
- 41
examples/terminal-dataflow/README.md View File

@@ -1,41 +0,0 @@
# Python Dataflow Example

This examples shows how to create and connect dora nodes in Python.

## Overview

The [`dataflow.yml`](./dataflow.yml) defines a simple dataflow graph with the following three nodes:

- a webcam node, that connects to your webcam and feed the dataflow with webcam frame as jpeg compressed bytearray.
- a window plotting node, that will retrieve the webcam image and plot it.

The same dataflow is implemented for a `dynamic-node` in [`dataflow_dynamic.yml`](./dataflow_dynamic.yml). It contains
the same nodes as the previous dataflow, but the plot node is a dynamic node. See the next section for more
information on how to start such a dataflow.

## Getting started

After installing Rust, `dora-cli` and `Python >3.11`, you will need to **activate** (or create and **activate**) a
[Python virtual environment](https://docs.python.org/3/library/venv.html).
Then, you will need to install the dependencies:

```bash
cd examples/python-dataflow
dora build ./dataflow.yml (or dora build ./dataflow_dynamic.yml)
```

It will install the required dependencies for the Python nodes.

Then you can run the dataflow:

```bash
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:

```bash
# activate your virtual environment in another terminal
python opencv-plot --name plot
```

+ 0
- 12
examples/terminal-dataflow/dataflow.yml View File

@@ -1,12 +0,0 @@
nodes:
- id: pyarrow-sender
build: pip install -e ../../node-hub/pyarrow-sender
path: dynamic
outputs:
- data

- id: terminal-print
build: pip install -e ../../node-hub/terminal-print
path: dynamic
inputs:
data: pyarrow-sender/data

Loading…
Cancel
Save