Skip to content

Commit f4d68dd

Browse files
committed
Add deps to mlflow container
1 parent 2439798 commit f4d68dd

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

dev/mlflow.Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ghcr.io/mlflow/mlflow:v2.20.3
2+
3+
4+
# hadolint ignore=DL3013
5+
RUN pip install --no-cache-dir --upgrade pip \
6+
&& pip install --no-cache-dir boto3==1.37.11 psycopg2-binary==2.9.10

docker-compose.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,26 @@ services:
3333
- minio:/data
3434

3535
mlflow:
36-
image: ghcr.io/mlflow/mlflow:latest
36+
build:
37+
context: .
38+
dockerfile: ./dev/mlflow.Dockerfile
3739
ports:
3840
- "5000:5000"
3941
environment:
4042
- MLFLOW_S3_ENDPOINT_URL=http://minio:9000
41-
- AWS_ACCESS_KEY=${DJANGO_MINIO_STORAGE_ACCESS_KEY:-minioAccessKey}
43+
- AWS_ACCESS_KEY_ID=${DJANGO_MINIO_STORAGE_ACCESS_KEY:-minioAccessKey}
4244
- AWS_SECRET_ACCESS_KEY=${DJANGO_DATABASE_PASSWORD:-minioSecretKey}
43-
command: mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri postgresql://postgres:postgres@postgres:5432/mlflow --artifacts-destination s3://bucket
45+
command: mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri postgresql://postgres:postgres@postgres:5432/mlflow --artifacts-destination s3://mlflow --default-artifact-root s3://mlflow
46+
47+
# mlflow:
48+
# image: ghcr.io/mlflow/mlflow:latest
49+
# ports:
50+
# - "5000:5000"
51+
# environment:
52+
# - MLFLOW_S3_ENDPOINT_URL=http://minio:9000
53+
# - AWS_ACCESS_KEY_ID=${DJANGO_MINIO_STORAGE_ACCESS_KEY:-minioAccessKey}
54+
# - AWS_SECRET_ACCESS_KEY=${DJANGO_DATABASE_PASSWORD:-minioSecretKey}
55+
# command: bash -c "python3 -m pip install psycopg2-binary boto3 && mlflow server --host 0.0.0.0 --port 5000 --backend-store-uri postgresql://postgres:postgres@postgres:5432/mlflow --artifacts-destination s3://mlflow --default-artifact-root s3://mlflow"
4456

4557
volumes:
4658
postgres:

0 commit comments

Comments
 (0)