From d2113d7b509a39e81da38d59595c25b441625c26 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Tue, 4 Mar 2025 19:39:20 +0100 Subject: [PATCH] Add reinstall command within run.rs to avoid silently using old version of dora node api python --- README.md | 2 +- examples/camera/README.md | 2 +- examples/camera/run.rs | 8 +++++++- examples/echo/README.md | 2 +- examples/llm/README.md | 2 +- examples/openai-server/README.md | 2 +- examples/pyarrow-test/README.md | 2 +- examples/python-dataflow/README.md | 1 + examples/python-dataflow/run.rs | 8 +++++++- examples/python-operator-dataflow/README.md | 4 ++-- examples/python-operator-dataflow/run.rs | 8 +++++++- examples/python-ros2-dataflow/README.md | 2 +- examples/python-ros2-dataflow/run.rs | 8 +++++++- examples/reachy2/README.md | 2 +- examples/rerun-viewer/README.md | 2 +- examples/rerun-viewer/run.rs | 2 +- examples/speech-to-speech/README.md | 2 +- examples/vlm/README.md | 2 +- examples/vlm/run.rs | 8 +++++++- 19 files changed, 50 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5a3fbed4..db15d186 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ A lot of guides are available on [this section](https://dora-rs.ai/docs/guides/) ```bash cd examples/python-dataflow uv venv --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/camera/README.md b/examples/camera/README.md index 273adb2d..9b432eea 100644 --- a/examples/camera/README.md +++ b/examples/camera/README.md @@ -4,7 +4,7 @@ Make sure to have, dora and pip installed. ```bash uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/camera/run.rs b/examples/camera/run.rs index b02e9a06..9c475c26 100644 --- a/examples/camera/run.rs +++ b/examples/camera/run.rs @@ -18,7 +18,13 @@ async fn main() -> eyre::Result<()> { .context("failed to create venv")?; run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &[ + "pip", + "install", + "-e", + "../../apis/python/node", + "--reinstall", + ], None, ) .await diff --git a/examples/echo/README.md b/examples/echo/README.md index c21d04cb..a885b941 100644 --- a/examples/echo/README.md +++ b/examples/echo/README.md @@ -4,7 +4,7 @@ Make sure to have, dora, uv and cargo installed. ```bash uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/llm/README.md b/examples/llm/README.md index aae83a75..c40325b2 100644 --- a/examples/llm/README.md +++ b/examples/llm/README.md @@ -5,7 +5,7 @@ Make sure to have, dora, pip and cargo installed. ```bash # Make sure to not be in a virtual environment uv venv --seed -p 3.11 -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build qwen-dev.yml --uv dora run qwen-dev.yml --uv ``` diff --git a/examples/openai-server/README.md b/examples/openai-server/README.md index 7b72e884..88319e97 100644 --- a/examples/openai-server/README.md +++ b/examples/openai-server/README.md @@ -8,7 +8,7 @@ Make sure to have, dora, uv and cargo installed. ```bash uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv diff --git a/examples/pyarrow-test/README.md b/examples/pyarrow-test/README.md index c21d04cb..a885b941 100644 --- a/examples/pyarrow-test/README.md +++ b/examples/pyarrow-test/README.md @@ -4,7 +4,7 @@ Make sure to have, dora, uv and cargo installed. ```bash uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/python-dataflow/README.md b/examples/python-dataflow/README.md index cd36d220..eebfcfa8 100644 --- a/examples/python-dataflow/README.md +++ b/examples/python-dataflow/README.md @@ -19,6 +19,7 @@ After installing Rust, `dora-cli` and `uv` (if you installed the cli without pip ```bash cd examples/python-dataflow +uv pip install -e ../../apis/python/node --reinstall dora build ./dataflow.yml --uv (or dora build ./dataflow_dynamic.yml --uv) ``` diff --git a/examples/python-dataflow/run.rs b/examples/python-dataflow/run.rs index 5cb4ac33..23b254e2 100644 --- a/examples/python-dataflow/run.rs +++ b/examples/python-dataflow/run.rs @@ -19,7 +19,13 @@ async fn main() -> eyre::Result<()> { run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &[ + "pip", + "install", + "-e", + "../../apis/python/node", + "--reinstall", + ], None, ) .await diff --git a/examples/python-operator-dataflow/README.md b/examples/python-operator-dataflow/README.md index 30b04e61..48580ec2 100644 --- a/examples/python-operator-dataflow/README.md +++ b/examples/python-operator-dataflow/README.md @@ -31,13 +31,13 @@ pip install -r requirements_llm.txt - Start the object detection dataflow alone: ```bash -dora start dataflow.yml +dora run dataflow.yml ``` - Start the llm dataflow (Only works on Windows and Linux): ```bash -dora start dataflow_llm.yml +dora run dataflow_llm.yml ``` Within the window you can ask question such as: diff --git a/examples/python-operator-dataflow/run.rs b/examples/python-operator-dataflow/run.rs index b02e9a06..9c475c26 100644 --- a/examples/python-operator-dataflow/run.rs +++ b/examples/python-operator-dataflow/run.rs @@ -18,7 +18,13 @@ async fn main() -> eyre::Result<()> { .context("failed to create venv")?; run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &[ + "pip", + "install", + "-e", + "../../apis/python/node", + "--reinstall", + ], None, ) .await diff --git a/examples/python-ros2-dataflow/README.md b/examples/python-ros2-dataflow/README.md index a70b80f9..86b0a21f 100644 --- a/examples/python-ros2-dataflow/README.md +++ b/examples/python-ros2-dataflow/README.md @@ -15,7 +15,7 @@ source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node & source /opt/ros/humble/setup.bash && ros2 run examples_rclcpp_minimal_service service_main & # cd examples/python-ros2-dataflow -uv pip install -e ../.../apis/python/node +uv pip install -e ../.../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/python-ros2-dataflow/run.rs b/examples/python-ros2-dataflow/run.rs index 5cb4ac33..23b254e2 100644 --- a/examples/python-ros2-dataflow/run.rs +++ b/examples/python-ros2-dataflow/run.rs @@ -19,7 +19,13 @@ async fn main() -> eyre::Result<()> { run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &[ + "pip", + "install", + "-e", + "../../apis/python/node", + "--reinstall", + ], None, ) .await diff --git a/examples/reachy2/README.md b/examples/reachy2/README.md index 27a9732b..52925a46 100644 --- a/examples/reachy2/README.md +++ b/examples/reachy2/README.md @@ -20,7 +20,7 @@ cd dora/examples/reachy2 ```bash # Make sure to not be in a virtual environment uv venv --seed -p 3.11 -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build demo-dev.yml --uv dora run demo-dev.yml --uv diff --git a/examples/rerun-viewer/README.md b/examples/rerun-viewer/README.md index c5742896..eae43ff3 100644 --- a/examples/rerun-viewer/README.md +++ b/examples/rerun-viewer/README.md @@ -6,7 +6,7 @@ This examples shows how to create and connect dora to rerun. ```bash uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build dataflow.yml --uv dora run dataflow.yml --uv ``` diff --git a/examples/rerun-viewer/run.rs b/examples/rerun-viewer/run.rs index f58f6f12..d085ddf9 100644 --- a/examples/rerun-viewer/run.rs +++ b/examples/rerun-viewer/run.rs @@ -18,7 +18,7 @@ async fn main() -> eyre::Result<()> { .context("failed to create venv")?; run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &["pip", "install", "-e", "../../apis/python/node", "--reinstall"], None, ) .await diff --git a/examples/speech-to-speech/README.md b/examples/speech-to-speech/README.md index 3f4312df..931122be 100644 --- a/examples/speech-to-speech/README.md +++ b/examples/speech-to-speech/README.md @@ -4,7 +4,7 @@ Make sure to have, dora, pip and cargo installed. ```bash uv venv --seed -p 3.11 -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build kokoro-dev.yml dora run kokoro-dev.yml ``` diff --git a/examples/vlm/README.md b/examples/vlm/README.md index 1f3f4bab..38fdf401 100644 --- a/examples/vlm/README.md +++ b/examples/vlm/README.md @@ -5,7 +5,7 @@ Make sure to have, dora, uv and cargo installed. ```bash cd examples/vlm uv venv -p 3.11 --seed -uv pip install -e ../../apis/python/node +uv pip install -e ../../apis/python/node --reinstall dora build qwen2-5-vl-vision-only-dev.yml --uv dora run qwen2-5-vl-vision-only-dev.yml --uv ``` diff --git a/examples/vlm/run.rs b/examples/vlm/run.rs index f58f6f12..1ec38c80 100644 --- a/examples/vlm/run.rs +++ b/examples/vlm/run.rs @@ -18,7 +18,13 @@ async fn main() -> eyre::Result<()> { .context("failed to create venv")?; run( &uv, - &["pip", "install", "-e", "../../apis/python/node"], + &[ + "pip", + "install", + "-e", + "../../apis/python/node", + "--reinstall", + ], None, ) .await