удален mlflow из docker compose
This commit is contained in:
parent
212d03da67
commit
d91eca366f
3 changed files with 5 additions and 37 deletions
|
|
@ -23,9 +23,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN uv pip install --system --no-deps --no-build-isolation .
|
RUN uv pip install --system --no-deps --no-build-isolation .
|
||||||
|
|
||||||
# Expose Web UI port and MLflow port
|
# Expose Web UI port
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
EXPOSE 5000
|
|
||||||
|
|
||||||
# Start Web UI using the system entry point
|
# Start Web UI using the system entry point
|
||||||
CMD ["yolo-train-webui", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["yolo-train-webui", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,8 @@ services:
|
||||||
- ./models:/workspace/models
|
- ./models:/workspace/models
|
||||||
- ./models/.config:/root/.config/Ultralytics
|
- ./models/.config:/root/.config/Ultralytics
|
||||||
environment:
|
environment:
|
||||||
# Use the Compose MLflow service so metadata and artifacts survive container recreation.
|
# 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://mlflow:5000
|
YOLO_WEBUI_MLFLOW_TRACKING_URI: http://host.docker.internal:5000
|
||||||
depends_on:
|
|
||||||
- mlflow
|
|
||||||
# Uncomment the block below on Linux with NVIDIA GPU to pass the graphics card into the container:
|
# Uncomment the block below on Linux with NVIDIA GPU to pass the graphics card into the container:
|
||||||
# deploy:
|
# deploy:
|
||||||
# resources:
|
# resources:
|
||||||
|
|
@ -26,28 +24,3 @@ services:
|
||||||
# capabilities: [gpu]
|
# capabilities: [gpu]
|
||||||
ipc: host
|
ipc: host
|
||||||
restart: unless-stopped
|
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
|
|
||||||
|
|
|
||||||
|
|
@ -12,16 +12,12 @@ def test_compose_is_local_and_does_not_require_nvidia() -> None:
|
||||||
compose = yaml.safe_load(
|
compose = yaml.safe_load(
|
||||||
(PROJECT_ROOT / "docker-compose.yml").read_text(encoding="utf-8")
|
(PROJECT_ROOT / "docker-compose.yml").read_text(encoding="utf-8")
|
||||||
)
|
)
|
||||||
|
assert set(compose["services"].keys()) == {"webui"}
|
||||||
webui = compose["services"]["webui"]
|
webui = compose["services"]["webui"]
|
||||||
|
|
||||||
assert webui["ports"] == ["127.0.0.1:8000:8000"]
|
assert webui["ports"] == ["127.0.0.1:8000:8000"]
|
||||||
assert "deploy" not in webui
|
assert "deploy" not in webui
|
||||||
|
assert "YOLO_WEBUI_MLFLOW_TRACKING_URI" in webui["environment"]
|
||||||
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"
|
|
||||||
|
|
||||||
|
|
||||||
def test_docker_dependencies_are_exported_from_lock_file() -> None:
|
def test_docker_dependencies_are_exported_from_lock_file() -> None:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue