Skip to content

Commit

Permalink
Add configurable memory section and README section
Browse files Browse the repository at this point in the history
  • Loading branch information
haixuanTao committed Apr 22, 2024
1 parent f6ce04b commit 73b83f2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
24 changes: 24 additions & 0 deletions tool_nodes/dora-rerun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,27 @@ cargo install --force [email protected]
git clone [email protected]:dora-rs/dora.git
cargo install --git https://github.com/dora-rs/dora dora-rerun
```

## Adding to existing graph:

```yaml
- id: rerun
custom:
source: dora-rerun
inputs:
image: webcam/image
text: webcam/text
boxes2d: object_detection/bbox
envs:
IMAGE_WIDTH: 960
IMAGE_HEIGHT: 540
IMAGE_DEPTH: 3
RERUN_MEMORY_LIMIT: 25%
```
## Configurations
- IMAGE_WIDTH: Image width in pixels
- IMAGE_HEIGHT: Image height in heights
- IMAGE_DEPTH: Image depth
- RERUN_MEMORY_LIMIT: Rerun memory limit
7 changes: 6 additions & 1 deletion tool_nodes/dora-rerun/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ fn main() -> Result<()> {

// Limit memory usage
let mut options = SpawnOptions::default();
options.memory_limit = "25%".into();

let memory_limit = std::env::var("RERUN_MEMORY_LIMIT")
.context("Could not read image height")?
.parse::<String>()
.unwrap_or("25%".into());
options.memory_limit = memory_limit;

let rec = rerun::RecordingStreamBuilder::new("dora-rerun")
.spawn_opts(&options, None)
Expand Down

0 comments on commit 73b83f2

Please sign in to comment.