Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/deepstream_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The models are **validated and ready for performance benchmarking**.
- **Engines:** `/workspace/models/deepstream/`
- **Script used:** `src/validate_deepstream_vs_onnx.py`
- **Execution environments:**
- `run_dev.sh` (x86_64) → ONNX inference
- `run_dev_jetson.sh` (ARM Jetson) → DeepStream inference
- `scripts/run_dev_ml_cpu.sh` (x86_64) → ONNX inference
- `scripts/run_dev_jetson.sh` (ARM Jetson) → DeepStream inference

---
2 changes: 1 addition & 1 deletion docs/general/setup_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ We use **Docker** to make sure everyone has the same environment. You can think

Then run:
```bash
bash run_dev.sh
bash scripts/run_dev_ml_cpu.sh
```

This will:
Expand Down
14 changes: 7 additions & 7 deletions docs/mongodb_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Deploy a simple MongoDB setup with scripts for up/down/cleanup, and provide usag

## Scripts

* `up.sh` - starts MongoDB container
* `down.sh` - stops MongoDB container
* `cleanup.sh` - removes container, network, and data
* `database_up.sh` - starts MongoDB container
* `database_down.sh` - stops MongoDB container
* `database_cleanup.sh` - removes container, network, and data

## Usage

```bash
cd ~/AgStream/database/scripts
./up.sh # Start MongoDB
./down.sh # Stop MongoDB
./cleanup.sh # Cleanup all data and containers
cd ~/AgStream/scripts
./database_up.sh # Start MongoDB
./database_down.sh # Stop MongoDB
./database_cleanup.sh # Cleanup all data and containers
```

## Connection
Expand Down
12 changes: 6 additions & 6 deletions docs/nvmsgbroker_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ It processes **RTSP video streams**, runs **classification inference**, and stor

```bash
# 1. Start database services (MongoDB + MQTT broker)
./services/database/up.sh
./scripts/database_up.sh


# 2. Clear MongoDB (for fresh start)
docker exec -it agstream_mongo mongosh agstream --eval "db.predictions.deleteMany({})"

# 3. Start Consumer (builds image automatically on first run)
./services/consumer/start_consumer.sh
./scripts/start_mqtt_consumer.sh

# 4. Verify Consumer is running
docker logs mqtt_consumer -f

# 5. Start DeepStream
./run_dev_arm.sh
./scripts/run_dev_jetson.sh

# 6. Inside DeepStream container
python3 src/rtsp/rtsp_server.py &
Expand All @@ -64,7 +64,7 @@ python3 src/nvmsgbroker_pipeline.py
* **Purpose:** Transfers MQTT messages to MongoDB
* **Technology:** Python script using `paho-mqtt` and `pymongo`
* **Auto-build:** First run creates Docker image with dependencies pre-installed
* **Restart:** `./start_consumer.sh` stops old container and starts a new one
* **Restart:** `./scripts/start_mqtt_consumer.sh` stops old container and starts a new one

### 🧩 Data Flow

Expand Down Expand Up @@ -120,7 +120,7 @@ docker ps | grep agstream

# Restart if needed
docker compose up -d
./start_consumer.sh
./scripts/start_mqtt_consumer.sh
```

### No data in MongoDB
Expand All @@ -141,7 +141,7 @@ docker logs agstream_mosquitto
**DeepStream → nvmsgbroker → MQTT → Consumer → MongoDB**

📝 **Note:** The Consumer is **REQUIRED** to transfer data from MQTT to MongoDB.
The `start_consumer.sh` script automatically builds the Docker image on first run.
The `start_mqtt_consumer.sh` script automatically builds the Docker image on first run.

---

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
echo "Cleaning MongoDB data and containers..."

# Move to MongoDB environment directory
docker compose -f "$(dirname "$0")/../../env/mongodb/docker-compose.yml" down -v
docker compose -f "$(dirname "$0")/../env/mongodb/docker-compose.yml" down -v

# Remove any persisted data directory (if it exists)
rm -rf "$(dirname "$0")/../../env/mongodb/data/"
Expand Down
2 changes: 1 addition & 1 deletion services/database/down.sh → scripts/database_down.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e
echo "Stopping MongoDB container..."

# Move to MongoDB directory (relative to project root)
docker compose -f "$(dirname "$0")/../../env/mongodb/docker-compose.yml" down
docker compose -f "$(dirname "$0")/../env/mongodb/docker-compose.yml" down

echo "MongoDB stopped and removed successfully."
2 changes: 1 addition & 1 deletion services/database/up.sh → scripts/database_up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
echo "Starting MongoDB container..."

# Define the compose file path
COMPOSE_FILE="$(dirname "$0")/../../env/mongodb/docker-compose.yml"
COMPOSE_FILE="$(dirname "$0")/../env/mongodb/docker-compose.yml"

# Ensure old containers are cleaned up if needed
docker compose -f "$COMPOSE_FILE" down --remove-orphans >/dev/null 2>&1 || true
Expand Down
2 changes: 1 addition & 1 deletion run_dev_jetson.sh → scripts/run_dev_jetson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ USER_ID=$(id -u)
# Base directories
script_dir=$(dirname "$(realpath "$0")")
workspace_dir=${script_dir}
env_dir=${workspace_dir}/env/jetson
env_dir=${workspace_dir}/../env/jetson

# Container and image names
IMAGE_NAME="inference-opt-jetson"
Expand Down
2 changes: 1 addition & 1 deletion run_dev.sh → scripts/run_dev_ml_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o xtrace # print each command before executing
# Base directories
script_dir=$(dirname "$(realpath "$0")")
workspace_dir=${script_dir}
env_dir=${workspace_dir}/env/ml_cpu
env_dir=${workspace_dir}/../env/ml_cpu

# Container and image names
IMAGE_NAME="inference-opt"
Expand Down
File renamed without changes.
Loading