-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (76 loc) · 2.95 KB
/
Copy pathMakefile
File metadata and controls
96 lines (76 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# ──────────────────────────────────────────────────────────
# RigVision-3D — Makefile
# ──────────────────────────────────────────────────────────
# Developer shortcuts. Run with: make <target>
#
# Quick start:
# make up → start Docker infrastructure
# make demo → run full demo (backend + CV demo + frontend)
# ──────────────────────────────────────────────────────────
.PHONY: up down backend frontend cv-demo cv-live demo install clean logs \
sensor-sim kafka-bridge \
scada scada-modbus-sim scada-mqtt-sim
# ── Infrastructure ──
up:
docker compose up -d
@echo "✅ Infrastructure started. Services:"
@echo " Redis: localhost:6379"
@echo " Postgres: localhost:5432"
@echo " Neo4j: http://localhost:7474"
@echo " ChromaDB: http://localhost:8100"
@echo " Kafka: localhost:9092"
down:
docker compose down
logs:
docker compose logs -f
# ── Individual Services ──
backend:
cd backend && python main.py
frontend:
cd frontend && npm run dev
cv-demo:
cd cv && python pipeline.py --mode demo
cv-live:
cd cv && python pipeline.py --mode live --cameras 0 1 2
sensor-sim:
python -m sensors.simulator.simulate
kafka-bridge:
python -m sensors.ingest.kafka_bridge
scada:
python -m scada.gateway
scada-modbus-sim:
python -m scada.simulators.modbus_server
scada-mqtt-sim:
python -m scada.simulators.mqtt_publisher
# ── Combo Commands ──
# Full demo: requires 3 terminal windows
demo:
@echo "RigVision-3D Demo Mode"
@echo "Run these in separate terminals:"
@echo ""
@echo " Terminal 1: make backend"
@echo " Terminal 2: make cv-demo"
@echo " Terminal 3: make frontend"
@echo ""
@echo "SCADA data path (protocols → Redis + TimescaleDB):"
@echo " Terminal 4: make scada-modbus-sim (Modbus TCP slave, zone_a sensors)"
@echo " Terminal 5: make scada-mqtt-sim (MQTT publisher, zone_b sensors)"
@echo " Terminal 6: make scada (SCADA gateway — reads protocols, writes DB)"
@echo ""
@echo "Legacy Kafka path (optional, parallel to SCADA):"
@echo " Terminal 7: make sensor-sim"
@echo " Terminal 8: make kafka-bridge"
@echo ""
@echo "Then open: http://localhost:5173"
# ── Setup ──
install:
pip install -r requirements.txt
cd frontend && npm install
@echo "✅ All dependencies installed"
@echo " NOTE: install PyTorch with CUDA first:"
@echo " pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121"
clean:
docker compose down -v
rm -rf frontend/node_modules frontend/dist
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
@echo "✅ Cleaned up"