Replace MLflow inline pip hack with proper Dockerfile
Some checks failed
Deploy to exe.dev / deploy (push) Has been cancelled

Add services/mlflow/Dockerfile that extends the official image with
psycopg2-binary, and point docker-compose to build from it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marko Djordjevic 2026-02-21 09:57:24 +01:00
parent c77d17e5e2
commit 61f2471d48
2 changed files with 10 additions and 10 deletions

View file

@ -63,15 +63,12 @@ services:
start_period: 40s
mlflow:
image: ghcr.io/mlflow/mlflow:v2.10.0
build: ./services/mlflow
ports:
- "127.0.0.1:5000:5000"
volumes:
- mlflow-data:/mlflow
entrypoint: ["/bin/sh", "-c"]
command:
- |
pip install --quiet psycopg2-binary &&
command: >
mlflow server
--backend-store-uri "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}"
--default-artifact-root /mlflow/artifacts

View file

@ -0,0 +1,3 @@
FROM ghcr.io/mlflow/mlflow:v2.10.0
RUN pip install --no-cache-dir psycopg2-binary