Dev: run full system via main.py in compose; add config.compose.json pointing MQTT to 'mqtt' service and map /storage
This commit is contained in:
93
api/config.compose.json
Normal file
93
api/config.compose.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
"mqtt": {
|
||||||
|
"broker_host": "mqtt",
|
||||||
|
"broker_port": 1883,
|
||||||
|
"username": null,
|
||||||
|
"password": null,
|
||||||
|
"topics": {
|
||||||
|
"vibratory_conveyor": "vision/vibratory_conveyor/state",
|
||||||
|
"blower_separator": "vision/blower_separator/state"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"base_path": "/storage",
|
||||||
|
"max_file_size_mb": 1000,
|
||||||
|
"max_recording_duration_minutes": 60,
|
||||||
|
"cleanup_older_than_days": 30
|
||||||
|
},
|
||||||
|
"system": {
|
||||||
|
"camera_check_interval_seconds": 2,
|
||||||
|
"log_level": "DEBUG",
|
||||||
|
"log_file": "usda_vision_system.log",
|
||||||
|
"api_host": "0.0.0.0",
|
||||||
|
"api_port": 8000,
|
||||||
|
"enable_api": true,
|
||||||
|
"timezone": "America/New_York",
|
||||||
|
"auto_recording_enabled": true
|
||||||
|
},
|
||||||
|
"cameras": [
|
||||||
|
{
|
||||||
|
"name": "camera1",
|
||||||
|
"machine_topic": "blower_separator",
|
||||||
|
"storage_path": "/storage/camera1",
|
||||||
|
"exposure_ms": 0.3,
|
||||||
|
"gain": 4.0,
|
||||||
|
"target_fps": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"video_format": "mp4",
|
||||||
|
"video_codec": "mp4v",
|
||||||
|
"video_quality": 95,
|
||||||
|
"auto_start_recording_enabled": true,
|
||||||
|
"auto_recording_max_retries": 3,
|
||||||
|
"auto_recording_retry_delay_seconds": 2,
|
||||||
|
"sharpness": 0,
|
||||||
|
"contrast": 100,
|
||||||
|
"saturation": 100,
|
||||||
|
"gamma": 100,
|
||||||
|
"noise_filter_enabled": false,
|
||||||
|
"denoise_3d_enabled": false,
|
||||||
|
"auto_white_balance": false,
|
||||||
|
"color_temperature_preset": 0,
|
||||||
|
"wb_red_gain": 0.94,
|
||||||
|
"wb_green_gain": 1.0,
|
||||||
|
"wb_blue_gain": 0.87,
|
||||||
|
"anti_flicker_enabled": false,
|
||||||
|
"light_frequency": 0,
|
||||||
|
"bit_depth": 8,
|
||||||
|
"hdr_enabled": false,
|
||||||
|
"hdr_gain_mode": 2
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "camera2",
|
||||||
|
"machine_topic": "vibratory_conveyor",
|
||||||
|
"storage_path": "/storage/camera2",
|
||||||
|
"exposure_ms": 0.2,
|
||||||
|
"gain": 2.0,
|
||||||
|
"target_fps": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"video_format": "mp4",
|
||||||
|
"video_codec": "mp4v",
|
||||||
|
"video_quality": 95,
|
||||||
|
"auto_start_recording_enabled": true,
|
||||||
|
"auto_recording_max_retries": 3,
|
||||||
|
"auto_recording_retry_delay_seconds": 2,
|
||||||
|
"sharpness": 0,
|
||||||
|
"contrast": 100,
|
||||||
|
"saturation": 100,
|
||||||
|
"gamma": 100,
|
||||||
|
"noise_filter_enabled": false,
|
||||||
|
"denoise_3d_enabled": false,
|
||||||
|
"auto_white_balance": false,
|
||||||
|
"color_temperature_preset": 0,
|
||||||
|
"wb_red_gain": 1.01,
|
||||||
|
"wb_green_gain": 1.0,
|
||||||
|
"wb_blue_gain": 0.87,
|
||||||
|
"anti_flicker_enabled": false,
|
||||||
|
"light_frequency": 0,
|
||||||
|
"bit_depth": 8,
|
||||||
|
"hdr_enabled": false,
|
||||||
|
"hdr_gain_mode": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
@@ -6,13 +6,13 @@ services:
|
|||||||
working_dir: /app
|
working_dir: /app
|
||||||
volumes:
|
volumes:
|
||||||
- ./api:/app
|
- ./api:/app
|
||||||
- ./api/storage:/app/storage
|
- ./api/storage:/storage
|
||||||
environment:
|
environment:
|
||||||
- PYTHONUNBUFFERED=1
|
- PYTHONUNBUFFERED=1
|
||||||
command: >
|
command: >
|
||||||
sh -lc "
|
sh -lc "
|
||||||
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; else pip install --no-cache-dir -e .; fi;
|
if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; else pip install --no-cache-dir -e .; fi;
|
||||||
uvicorn usda_vision_system.api.server:app --host 0.0.0.0 --port 8000 --reload
|
python main.py --config config.compose.json
|
||||||
"
|
"
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
|
|||||||
Reference in New Issue
Block a user