train_utility/docker-compose.yml
2026-08-04 14:00:46 +04:00

53 lines
1.4 KiB
YAML
Executable file

services:
webui:
build:
context: .
image: yolo-train-webui:latest
ports:
# The training API has no built-in user accounts, so expose it locally only.
- "127.0.0.1:8000:8000"
volumes:
- ./datasets:/workspace/datasets
- ./runs:/workspace/runs
- ./models:/workspace/models
- ./models/.config:/root/.config/Ultralytics
environment:
# Use the Compose MLflow service so metadata and artifacts survive container recreation.
YOLO_WEBUI_MLFLOW_TRACKING_URI: http://mlflow:5000
depends_on:
- mlflow
# Uncomment the block below on Linux with NVIDIA GPU to pass the graphics card into the container:
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [gpu]
ipc: host
restart: unless-stopped
mlflow:
build:
context: .
image: yolo-train-webui:latest
command:
- mlflow
- server
- --backend-store-uri
- sqlite:////mlflow/mlflow.db
- --artifacts-destination
- /mlflow/artifacts
- --host
- 0.0.0.0
- --port
- "5000"
- --workers
- "1"
- --allowed-hosts
- localhost:5000,127.0.0.1:5000,mlflow:5000
ports:
- "127.0.0.1:5000:5000"
volumes:
- ./mlflow:/mlflow
restart: unless-stopped