| @@ -118,6 +118,14 @@ tokio-stream = "0.1.11" | |||
| name = "c-dataflow" | |||
| path = "examples/c-dataflow/run.rs" | |||
| [[example]] | |||
| name = "camera" | |||
| path = "examples/camera/run.rs" | |||
| [[example]] | |||
| name = "vlm" | |||
| path = "examples/vlm/run.rs" | |||
| [[example]] | |||
| name = "rust-dataflow" | |||
| path = "examples/rust-dataflow/run.rs" | |||
| @@ -3,7 +3,7 @@ | |||
| Make sure to have, dora and pip installed. | |||
| ```bash | |||
| dora up | |||
| dora build dataflow.yml | |||
| dora start dataflow.yml | |||
| uv venv -p 3.11 --seed | |||
| dora build dataflow.yml --uv | |||
| dora run dataflow.yml --uv | |||
| ``` | |||
| @@ -1,6 +1,6 @@ | |||
| use dora_core::{get_pip_path, get_python_path, run}; | |||
| use dora_core::{get_uv_path, run}; | |||
| use dora_tracing::set_up_tracing; | |||
| use eyre::{bail, ContextCompat, WrapErr}; | |||
| use eyre::{bail, WrapErr}; | |||
| use std::path::Path; | |||
| #[tokio::main] | |||
| @@ -11,57 +11,27 @@ async fn main() -> eyre::Result<()> { | |||
| std::env::set_current_dir(root.join(file!()).parent().unwrap()) | |||
| .wrap_err("failed to set working dir")?; | |||
| run( | |||
| get_python_path().context("Could not get python binary")?, | |||
| &["-m", "venv", "../.env"], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| let venv = &root.join("examples").join(".env"); | |||
| std::env::set_var( | |||
| "VIRTUAL_ENV", | |||
| venv.to_str().context("venv path not valid unicode")?, | |||
| ); | |||
| let orig_path = std::env::var("PATH")?; | |||
| // bin folder is named Scripts on windows. | |||
| // 🤦♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1 | |||
| let venv_bin = if cfg!(windows) { | |||
| venv.join("Scripts") | |||
| } else { | |||
| venv.join("bin") | |||
| }; | |||
| let uv = get_uv_path().context("Could not get uv binary")?; | |||
| if cfg!(windows) { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{};{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } else { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{}:{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } | |||
| run(&uv, &["venv", "-p", "3.10", "--seed"], None) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| run( | |||
| get_pip_path().context("Could not get pip binary")?, | |||
| &["install", "maturin"], | |||
| Some(venv), | |||
| ) | |||
| .await | |||
| .context("pip install maturin failed")?; | |||
| run(&uv, &["pip", "install", "maturin"], None) | |||
| .await | |||
| .context("uv pip install maturin failed")?; | |||
| run( | |||
| "maturin", | |||
| &["develop"], | |||
| Some(&root.join("apis").join("python").join("node")), | |||
| &uv, | |||
| &[ | |||
| "run", | |||
| "maturin", | |||
| "develop", | |||
| "-m", | |||
| "../../apis/python/node/Cargo.toml", | |||
| "--uv", | |||
| ], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("maturin develop failed")?; | |||
| @@ -79,7 +49,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--").arg("build").arg(dataflow); | |||
| cmd.arg("--").arg("build").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -87,10 +57,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--") | |||
| .arg("daemon") | |||
| .arg("--run-dataflow") | |||
| .arg(dataflow); | |||
| cmd.arg("--").arg("run").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -1,9 +1,9 @@ | |||
| # Dora echo example | |||
| Make sure to have, dora, pip and cargo installed. | |||
| Make sure to have, dora, uv and cargo installed. | |||
| ```bash | |||
| dora up | |||
| dora build dataflow.yml | |||
| dora start dataflow.yml | |||
| uv venv -p 3.11 --seed | |||
| dora build dataflow.yml --uv | |||
| dora run dataflow.yml --uv | |||
| ``` | |||
| @@ -4,12 +4,12 @@ This is a quick example to showcase how use the `dora-openai-server` to receive | |||
| Dora Openai Server is still experimental and may change in the future. | |||
| Make sure to have, dora, pip and cargo installed. | |||
| Make sure to have, dora, uv and cargo installed. | |||
| ```bash | |||
| dora up | |||
| dora build dataflow.yml | |||
| dora start dataflow.yml | |||
| uv venv -p 3.11 --seed | |||
| dora build dataflow.yml --uv | |||
| dora run dataflow.yml --uv | |||
| # In a separate terminal | |||
| python openai_api_client.py | |||
| @@ -1,9 +1,9 @@ | |||
| # Dora echo example | |||
| Make sure to have, dora, pip and cargo installed. | |||
| Make sure to have, dora, uv and cargo installed. | |||
| ```bash | |||
| dora up | |||
| dora build dataflow.yml | |||
| dora start dataflow.yml | |||
| uv venv -p 3.11 --seed | |||
| dora build dataflow.yml --uv | |||
| dora run dataflow.yml --uv | |||
| ``` | |||
| @@ -21,7 +21,7 @@ Then, you will need to install the dependencies: | |||
| ```bash | |||
| cd examples/python-dataflow | |||
| dora build ./dataflow.yml (or dora build ./dataflow_dynamic.yml) | |||
| dora build ./dataflow.yml --uv (or dora build ./dataflow_dynamic.yml --uv) | |||
| ``` | |||
| It will install the required dependencies for the Python nodes. | |||
| @@ -29,8 +29,7 @@ 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) | |||
| dora run ./dataflow.yml --uv (or dora start ./dataflow_dynamic.yml --uv) | |||
| ``` | |||
| **Note**: if you're running the dynamic dataflow, you will need to start manually the opencv-plot node: | |||
| @@ -1,6 +1,6 @@ | |||
| nodes: | |||
| - id: camera | |||
| build: pip install ../../node-hub/opencv-video-capture | |||
| build: pip install -e ../../node-hub/opencv-video-capture | |||
| path: opencv-video-capture | |||
| inputs: | |||
| tick: dora/timer/millis/20 | |||
| @@ -12,22 +12,16 @@ nodes: | |||
| IMAGE_HEIGHT: 480 | |||
| - id: object-detection | |||
| build: pip install ../../node-hub/dora-yolo | |||
| build: pip install -e ../../node-hub/dora-yolo | |||
| path: dora-yolo | |||
| inputs: | |||
| image: | |||
| source: camera/image | |||
| queue_size: 1 | |||
| image: camera/image | |||
| outputs: | |||
| - bbox | |||
| env: | |||
| MODEL: yolov8n.pt | |||
| - id: plot | |||
| build: pip install ../../node-hub/opencv-plot | |||
| path: opencv-plot | |||
| build: pip install -e ../../node-hub/dora-rerun | |||
| path: dora-rerun | |||
| inputs: | |||
| image: | |||
| source: camera/image | |||
| queue_size: 1 | |||
| bbox: object-detection/bbox | |||
| image: camera/image | |||
| boxes2d: object-detection/bbox | |||
| @@ -1,6 +1,6 @@ | |||
| use dora_core::{get_pip_path, get_python_path, run}; | |||
| use dora_core::{get_uv_path, run}; | |||
| use dora_tracing::set_up_tracing; | |||
| use eyre::{bail, ContextCompat, WrapErr}; | |||
| use eyre::{bail, WrapErr}; | |||
| use std::path::Path; | |||
| #[tokio::main] | |||
| @@ -11,57 +11,27 @@ async fn main() -> eyre::Result<()> { | |||
| std::env::set_current_dir(root.join(file!()).parent().unwrap()) | |||
| .wrap_err("failed to set working dir")?; | |||
| run( | |||
| get_python_path().context("Could not get python binary")?, | |||
| &["-m", "venv", "../.env"], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| let venv = &root.join("examples").join(".env"); | |||
| std::env::set_var( | |||
| "VIRTUAL_ENV", | |||
| venv.to_str().context("venv path not valid unicode")?, | |||
| ); | |||
| let orig_path = std::env::var("PATH")?; | |||
| // bin folder is named Scripts on windows. | |||
| // 🤦♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1 | |||
| let venv_bin = if cfg!(windows) { | |||
| venv.join("Scripts") | |||
| } else { | |||
| venv.join("bin") | |||
| }; | |||
| let uv = get_uv_path().context("Could not get uv binary")?; | |||
| if cfg!(windows) { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{};{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } else { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{}:{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } | |||
| run(&uv, &["venv", "-p", "3.10", "--seed"], None) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| run( | |||
| get_pip_path().context("Could not get pip binary")?, | |||
| &["install", "maturin"], | |||
| Some(venv), | |||
| ) | |||
| .await | |||
| .context("pip install maturin failed")?; | |||
| run(&uv, &["pip", "install", "maturin"], None) | |||
| .await | |||
| .context("uv pip install maturin failed")?; | |||
| run( | |||
| "maturin", | |||
| &["develop"], | |||
| Some(&root.join("apis").join("python").join("node")), | |||
| &uv, | |||
| &[ | |||
| "run", | |||
| "maturin", | |||
| "develop", | |||
| "-m", | |||
| "../../apis/python/node/Cargo.toml", | |||
| "--uv", | |||
| ], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("maturin develop failed")?; | |||
| @@ -79,7 +49,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--").arg("build").arg(dataflow); | |||
| cmd.arg("--").arg("build").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -87,10 +57,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--") | |||
| .arg("daemon") | |||
| .arg("--run-dataflow") | |||
| .arg(dataflow); | |||
| cmd.arg("--").arg("run").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -1,10 +0,0 @@ | |||
| # Quick example of using Pyrealsense | |||
| Make sure to follow the installation at: [`node-hub/dora-pyrealsense/README.md`](node-hub/dora-pyrealsense/README.md) | |||
| Then: | |||
| ```bash | |||
| dora build dataflow.yaml | |||
| dora run dataflow.yaml | |||
| ``` | |||
| @@ -2,24 +2,10 @@ | |||
| This examples shows how to create and connect dora to rerun. | |||
| This nodes is still experimental and format for passing Images, Bounding boxes, and text are probably going to change in the future. | |||
| ## Getting Started | |||
| ```bash | |||
| cargo install --force rerun-cli@0.15.1 | |||
| ## To install this package | |||
| git clone git@github.com:dora-rs/dora.git | |||
| cargo install --git https://github.com/dora-rs/dora dora-rerun | |||
| dora start dataflow.yml --attach | |||
| uv venv -p 3.11 --seed | |||
| dora build dataflow.yml --uv | |||
| dora run dataflow.yml --uv | |||
| ``` | |||
| You will see two visualizations. One from matplotlib and one from rerun for comparison. | |||
| ## CI/CD | |||
| This example is not tested on the CI/CD as visualization is not really testable. | |||
| Please reach out in case of issues at: https://github.com/dora-rs/dora/issues | |||
| @@ -12,27 +12,11 @@ nodes: | |||
| IMAGE_HEIGHT: 480 | |||
| ENCODING: rgb8 | |||
| - id: object-detection | |||
| build: pip install -e ../../node-hub/dora-yolo | |||
| path: dora-yolo | |||
| inputs: | |||
| image: | |||
| source: camera/image | |||
| queue_size: 1 | |||
| outputs: | |||
| - bbox | |||
| env: | |||
| MODEL: yolov8n.pt | |||
| FORMAT: xywh | |||
| - id: rerun | |||
| build: cargo build -p dora-rerun --release | |||
| path: dora-rerun | |||
| inputs: | |||
| image: | |||
| source: camera/image | |||
| queue_size: 1 | |||
| boxes2d: object-detection/bbox | |||
| image: camera/image | |||
| env: | |||
| RERUN_FLUSH_TICK_SECS: "0.001" | |||
| RERUN_FLUSH_TICK_SECS: 0.001 | |||
| RERUN_MEMORY_LIMIT: 25% | |||
| @@ -1,6 +1,6 @@ | |||
| use dora_core::{get_pip_path, get_python_path, run}; | |||
| use dora_core::{get_uv_path, run}; | |||
| use dora_tracing::set_up_tracing; | |||
| use eyre::{bail, ContextCompat, WrapErr}; | |||
| use eyre::{bail, WrapErr}; | |||
| use std::path::Path; | |||
| #[tokio::main] | |||
| @@ -11,62 +11,32 @@ async fn main() -> eyre::Result<()> { | |||
| std::env::set_current_dir(root.join(file!()).parent().unwrap()) | |||
| .wrap_err("failed to set working dir")?; | |||
| run( | |||
| get_python_path().context("Could not get python binary")?, | |||
| &["-m", "venv", "../.env"], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| let venv = &root.join("examples").join(".env"); | |||
| std::env::set_var( | |||
| "VIRTUAL_ENV", | |||
| venv.to_str().context("venv path not valid unicode")?, | |||
| ); | |||
| let orig_path = std::env::var("PATH")?; | |||
| // bin folder is named Scripts on windows. | |||
| // 🤦♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1 | |||
| let venv_bin = if cfg!(windows) { | |||
| venv.join("Scripts") | |||
| } else { | |||
| venv.join("bin") | |||
| }; | |||
| let uv = get_uv_path().context("Could not get uv binary")?; | |||
| if cfg!(windows) { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{};{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } else { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{}:{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } | |||
| run(&uv, &["venv", "-p", "3.10", "--seed"], None) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| run( | |||
| get_pip_path().context("Could not get pip binary")?, | |||
| &["install", "maturin"], | |||
| Some(venv), | |||
| ) | |||
| .await | |||
| .context("pip install maturin failed")?; | |||
| run(&uv, &["pip", "install", "maturin"], None) | |||
| .await | |||
| .context("uv pip install maturin failed")?; | |||
| run( | |||
| "maturin", | |||
| &["develop"], | |||
| Some(&root.join("apis").join("python").join("node")), | |||
| &uv, | |||
| &[ | |||
| "run", | |||
| "maturin", | |||
| "develop", | |||
| "-m", | |||
| "../../apis/python/node/Cargo.toml", | |||
| "--uv", | |||
| ], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("maturin develop failed")?; | |||
| let dataflow = Path::new("dataflow.yml"); | |||
| let dataflow = Path::new("qwen2-5-vl-vision-only-dev.yml"); | |||
| run_dataflow(dataflow).await?; | |||
| Ok(()) | |||
| @@ -79,7 +49,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--").arg("build").arg(dataflow); | |||
| cmd.arg("--").arg("build").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -87,10 +57,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--") | |||
| .arg("daemon") | |||
| .arg("--run-dataflow") | |||
| .arg(dataflow); | |||
| cmd.arg("--").arg("run").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -1,11 +1,18 @@ | |||
| # Quick example on using a VLM with dora-rs | |||
| Make sure to have, dora, pip and cargo installed. | |||
| Make sure to have, dora, uv and cargo installed. | |||
| ```bash | |||
| dora build https://raw.githubusercontent.com/dora-rs/dora/main/examples/vlm/qwenvl.yml | |||
| cd examples/vlm | |||
| uv venv -p 3.11 --seed | |||
| dora build qwen2-5-vl-vision-only-dev.yml --uv | |||
| dora run qwen2-5-vl-vision-only-dev.yml --uv | |||
| ``` | |||
| dora run https://raw.githubusercontent.com/dora-rs/dora/main/examples/vlm/qwenvl.yml | |||
| - Without cloning the repository: | |||
| # Wait for the qwenvl, whisper model to download which can takes a bit of time. | |||
| ```bash | |||
| uv venv -p 3.11 --seed | |||
| dora build https://raw.githubusercontent.com/dora-rs/dora/main/examples/vlm/qwenvl.yml --uv | |||
| dora run https://raw.githubusercontent.com/dora-rs/dora/main/examples/vlm/qwenvl.yml --uv | |||
| ``` | |||
| @@ -1,6 +1,6 @@ | |||
| use dora_core::{get_pip_path, get_python_path, run}; | |||
| use dora_core::{get_uv_path, run}; | |||
| use dora_tracing::set_up_tracing; | |||
| use eyre::{bail, ContextCompat, WrapErr}; | |||
| use eyre::{bail, WrapErr}; | |||
| use std::path::Path; | |||
| #[tokio::main] | |||
| @@ -11,62 +11,32 @@ async fn main() -> eyre::Result<()> { | |||
| std::env::set_current_dir(root.join(file!()).parent().unwrap()) | |||
| .wrap_err("failed to set working dir")?; | |||
| run( | |||
| get_python_path().context("Could not get python binary")?, | |||
| &["-m", "venv", "../.env"], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| let venv = &root.join("examples").join(".env"); | |||
| std::env::set_var( | |||
| "VIRTUAL_ENV", | |||
| venv.to_str().context("venv path not valid unicode")?, | |||
| ); | |||
| let orig_path = std::env::var("PATH")?; | |||
| // bin folder is named Scripts on windows. | |||
| // 🤦♂️ See: https://github.com/pypa/virtualenv/commit/993ba1316a83b760370f5a3872b3f5ef4dd904c1 | |||
| let venv_bin = if cfg!(windows) { | |||
| venv.join("Scripts") | |||
| } else { | |||
| venv.join("bin") | |||
| }; | |||
| let uv = get_uv_path().context("Could not get uv binary")?; | |||
| if cfg!(windows) { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{};{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } else { | |||
| std::env::set_var( | |||
| "PATH", | |||
| format!( | |||
| "{}:{orig_path}", | |||
| venv_bin.to_str().context("venv path not valid unicode")? | |||
| ), | |||
| ); | |||
| } | |||
| run(&uv, &["venv", "-p", "3.10", "--seed"], None) | |||
| .await | |||
| .context("failed to create venv")?; | |||
| run( | |||
| get_pip_path().context("Could not get pip binary")?, | |||
| &["install", "maturin"], | |||
| Some(venv), | |||
| ) | |||
| .await | |||
| .context("pip install maturin failed")?; | |||
| run(&uv, &["pip", "install", "maturin"], None) | |||
| .await | |||
| .context("uv pip install maturin failed")?; | |||
| run( | |||
| "maturin", | |||
| &["develop"], | |||
| Some(&root.join("apis").join("python").join("node")), | |||
| &uv, | |||
| &[ | |||
| "run", | |||
| "maturin", | |||
| "develop", | |||
| "-m", | |||
| "../../apis/python/node/Cargo.toml", | |||
| "--uv", | |||
| ], | |||
| None, | |||
| ) | |||
| .await | |||
| .context("maturin develop failed")?; | |||
| let dataflow = Path::new("dataflow.yml"); | |||
| let dataflow = Path::new("qwen2-5-vl-vision-only-dev.yml"); | |||
| run_dataflow(dataflow).await?; | |||
| Ok(()) | |||
| @@ -79,7 +49,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--").arg("build").arg(dataflow); | |||
| cmd.arg("--").arg("build").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -87,10 +57,7 @@ async fn run_dataflow(dataflow: &Path) -> eyre::Result<()> { | |||
| let mut cmd = tokio::process::Command::new(&cargo); | |||
| cmd.arg("run"); | |||
| cmd.arg("--package").arg("dora-cli"); | |||
| cmd.arg("--") | |||
| .arg("daemon") | |||
| .arg("--run-dataflow") | |||
| .arg(dataflow); | |||
| cmd.arg("--").arg("run").arg(dataflow).arg("--uv"); | |||
| if !cmd.status().await?.success() { | |||
| bail!("failed to run dataflow"); | |||
| }; | |||
| @@ -56,6 +56,12 @@ pub fn get_pip_path() -> Result<std::path::PathBuf, eyre::ErrReport> { | |||
| Ok(python) | |||
| } | |||
| // Search for uv binary. | |||
| pub fn get_uv_path() -> Result<std::path::PathBuf, eyre::ErrReport> { | |||
| which::which("uv") | |||
| .context("failed to find `uv`. Make sure to install it using: https://docs.astral.sh/uv/getting-started/installation/") | |||
| } | |||
| // Helper function to run a program | |||
| pub async fn run<S>(program: S, args: &[&str], pwd: Option<&Path>) -> eyre::Result<()> | |||
| where | |||