Add safe YOLO model env configurator
This commit is contained in:
@@ -147,6 +147,30 @@ For Unraid/all-in-one deployments, place model files under
|
||||
`GEOINTEL_MODELS_PATH` so they appear in the container under `/app/models`, then
|
||||
set `YOLO_ENABLED=true` and `YOLO_MODEL_PATH=/app/models/<model>.pt`.
|
||||
|
||||
Configure the Unraid/Tower env file from an existing local model without
|
||||
downloading weights or running inference:
|
||||
|
||||
```bash
|
||||
python scripts/configure_yolo_model.py \
|
||||
--models-dir /mnt/user/appdata/geointel/models \
|
||||
--env-file /mnt/user/appdata/geointel/.env
|
||||
```
|
||||
|
||||
If exactly one supported model file (`.pt`, `.onnx` or `.engine`) is present,
|
||||
apply the env update explicitly:
|
||||
|
||||
```bash
|
||||
python scripts/configure_yolo_model.py \
|
||||
--models-dir /mnt/user/appdata/geointel/models \
|
||||
--env-file /mnt/user/appdata/geointel/.env \
|
||||
--apply
|
||||
```
|
||||
|
||||
The configurator refuses to proceed when no model exists or when multiple model
|
||||
files are present without `--model-file`. It writes only
|
||||
`GEOINTEL_INSTALL_AI=true`, `YOLO_ENABLED=true` and the mounted
|
||||
`YOLO_MODEL_PATH`.
|
||||
|
||||
Clean old offline demo export artifacts without touching uploaded source data:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user