удален mlflow из docker compose

This commit is contained in:
malvm 2026-08-05 09:36:35 +04:00
parent 212d03da67
commit d91eca366f
3 changed files with 5 additions and 37 deletions

View file

@ -23,9 +23,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
COPY src ./src
RUN uv pip install --system --no-deps --no-build-isolation .
# Expose Web UI port and MLflow port
# Expose Web UI port
EXPOSE 8000
EXPOSE 5000
# Start Web UI using the system entry point
CMD ["yolo-train-webui", "--host", "0.0.0.0", "--port", "8000"]

View file

@ -12,10 +12,8 @@ services:
- ./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
# Optional: tracking URI for external MLflow server (e.g. http://host.docker.internal:5000 or http://your-mlflow-host:5000)
YOLO_WEBUI_MLFLOW_TRACKING_URI: http://host.docker.internal:5000
# Uncomment the block below on Linux with NVIDIA GPU to pass the graphics card into the container:
# deploy:
# resources:
@ -26,28 +24,3 @@ services:
# 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

View file

@ -12,16 +12,12 @@ def test_compose_is_local_and_does_not_require_nvidia() -> None:
compose = yaml.safe_load(
(PROJECT_ROOT / "docker-compose.yml").read_text(encoding="utf-8")
)
assert set(compose["services"].keys()) == {"webui"}
webui = compose["services"]["webui"]
assert webui["ports"] == ["127.0.0.1:8000:8000"]
assert "deploy" not in webui
mlflow = compose["services"]["mlflow"]
assert mlflow["ports"] == ["127.0.0.1:5000:5000"]
assert mlflow["volumes"] == ["./mlflow:/mlflow"]
assert "server" in mlflow["command"]
assert webui["environment"]["YOLO_WEBUI_MLFLOW_TRACKING_URI"] == "http://mlflow:5000"
assert "YOLO_WEBUI_MLFLOW_TRACKING_URI" in webui["environment"]
def test_docker_dependencies_are_exported_from_lock_file() -> None: