Replace MLflow inline pip hack with proper Dockerfile
Some checks failed
Deploy to exe.dev / deploy (push) Has been cancelled
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:
parent
c77d17e5e2
commit
61f2471d48
2 changed files with 10 additions and 10 deletions
|
|
@ -63,20 +63,17 @@ services:
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
|
|
||||||
mlflow:
|
mlflow:
|
||||||
image: ghcr.io/mlflow/mlflow:v2.10.0
|
build: ./services/mlflow
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:5000:5000"
|
- "127.0.0.1:5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- mlflow-data:/mlflow
|
- mlflow-data:/mlflow
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
command: >
|
||||||
command:
|
mlflow server
|
||||||
- |
|
--backend-store-uri "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}"
|
||||||
pip install --quiet psycopg2-binary &&
|
--default-artifact-root /mlflow/artifacts
|
||||||
mlflow server
|
--host 0.0.0.0
|
||||||
--backend-store-uri "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}"
|
--port 5000
|
||||||
--default-artifact-root /mlflow/artifacts
|
|
||||||
--host 0.0.0.0
|
|
||||||
--port 5000
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
|
|
||||||
3
services/mlflow/Dockerfile
Normal file
3
services/mlflow/Dockerfile
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM ghcr.io/mlflow/mlflow:v2.10.0
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir psycopg2-binary
|
||||||
Loading…
Add table
Add a link
Reference in a new issue