Compare commits

...

4 Commits

Author SHA1 Message Date
  haixuantao eb6512fb81 Add additional details 10 months ago
  haixuantao 528bb90489 phi4 gpu example 10 months ago
  haixuantao b8a6ae2caf Adding phi4 remote example build command 10 months ago
  haixuantao c11d9c95eb Add phi4 remote flow 10 months ago
2 changed files with 86 additions and 0 deletions
Split View
  1. +28
    -0
      examples/translation/README.md
  2. +58
    -0
      examples/translation/phi4-remote.yml

+ 28
- 0
examples/translation/README.md View File

@@ -12,3 +12,31 @@ dora run phi4-dev.yml --uv

# Start talking or play a recording in English, Chinese, German, French, Italian, Japanese, Spanish, Portuguese
```

For the remote instance, with an example instance at ip: 3.82.54.170

```bash
cd examples/translation
uv venv --seed -p 3.11
uv pip install -e ../../node-hub/dora-microphone
uv pip install -e ../../node-hub/dora-rerun

dora daemon --coordinator-addr 3.82.54.170 --machine-id macbook &
dora start phi4-remote.yml --coordinator-addr 3.82.54.170 --uv

# When you see `all nodes are ready`
# Start talking and you should see text appearing
```

To setup the remote instance:

```bash
git clone https://github.com/dora-rs/dora.git
cd examples/translation

uv venv --seed -p 3.11
dora build phi4-remote.yml --uv

dora coordinator & # In a separate window is better
dora daemon --machine-id gpu
```

+ 58
- 0
examples/translation/phi4-remote.yml View File

@@ -0,0 +1,58 @@
nodes:
- id: dora-microphone
build: pip install -e ../../node-hub/dora-microphone
path: dora-microphone
_unstable_deploy:
machine: macbook
inputs:
tick: dora/timer/millis/2000
outputs:
- audio

- id: dora-vad
build: pip install -e ../../node-hub/dora-vad
path: dora-vad
_unstable_deploy:
machine: gpu
inputs:
audio: dora-microphone/audio
outputs:
- audio
env:
VIRTUAL_ENV: /home/ubuntu/dora/examples/translation/.venv

- id: dora-phi4
# This build currently only work on Linux/CUDA
build: |
pip install flash-attn --no-build-isolation
pip install -e ../../node-hub/dora-phi4
path: dora-phi4
_unstable_deploy:
machine: gpu
inputs:
audio: dora-vad/audio
text: sender/data
outputs:
- text
env:
LEAD_MODALITY: audio
VIRTUAL_ENV: /home/ubuntu/dora/examples/translation/.venv

- id: sender
build: pip install -e ../../node-hub/pyarrow-sender
path: pyarrow-sender
_unstable_deploy:
machine: gpu
outputs:
- data
env:
DATA: "Translate this audio to english."
VIRTUAL_ENV: /home/ubuntu/dora/examples/translation/.venv

- id: dora-rerun
build: pip install dora-rerun
path: dora-rerun
_unstable_deploy:
machine: macbook
inputs:
original_text: dora-phi4/text

Loading…
Cancel
Save