Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #206 from DougTrajano/DOUG-578
Browse files Browse the repository at this point in the history
Update mlflow to 2.0.1, postgres to 15.1, and remove monkey patch
  • Loading branch information
DougTrajano authored Nov 27, 2022
2 parents e8d52a2 + fce70ae commit b9623bd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 207 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10.5-slim
FROM python:3.10.8-slim

WORKDIR /app

Expand All @@ -10,7 +10,9 @@ RUN set -x && \
supervisor gettext-base nginx apache2-utils

COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
#COPY nginx.conf /etc/nginx/conf.d/default.conf

# We are getting the nginx.conf in the /scripts/nginx.sh file
# COPY nginx.conf /etc/nginx/conf.d/default.conf

# install pip then packages
RUN pip install --upgrade pip && \
Expand All @@ -20,9 +22,6 @@ RUN pip install --upgrade pip && \
RUN chmod +x /app/scripts/mlflow.sh && \
chmod +x /app/scripts/nginx.sh

# Monkey patching mlflow.store.db.utils.py to add NullPool to sqlalchemy engine
RUN cp /app/src/utils.py /usr/local/lib/python3.10/site-packages/mlflow/store/db/utils.py

EXPOSE ${PORT}

# WWW (nginx)
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
postgres:
image: postgres:14.2-alpine3.15
image: postgres:15.1-alpine3.16
restart: unless-stopped
ports:
- ${POSTGRES_PORT-5432}:${POSTGRES_PORT-5432}
Expand Down Expand Up @@ -38,7 +38,7 @@ services:
MLFLOW_DB_USERNAME: ${POSTGRES_USER-postgres}
MLFLOW_TRACKING_PASSWORD: ${MLFLOW_TRACKING_PASSWORD-mlflow}
MLFLOW_TRACKING_USERNAME: ${MLFLOW_TRACKING_USERNAME-mlflow}
MLFLOW_SQLALCHEMYSTORE_POOL_CLASS: NullPool
MLFLOW_SQLALCHEMYSTORE_POOLCLASS: NullPool

volumes:
postgres-db-volume:
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mlflow==1.30.0
mlflow==2.0.1
pymysql==1.0.2
psycopg2-binary==2.9.4
protobuf==4.21.8
gevent==22.10.1
boto3==1.24.96
psycopg2-binary==2.9.5
protobuf==4.21.9
gevent==22.10.2
boto3==1.26.16
194 changes: 0 additions & 194 deletions src/utils.py

This file was deleted.

2 changes: 1 addition & 1 deletion terraform/server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ resource "aws_apprunner_service" "mlflow_server" {
"MLFLOW_DB_DATABASE" = "${aws_rds_cluster.mlflow_backend_store.database_name}"
"MLFLOW_TRACKING_USERNAME" = var.mlflow_username
"MLFLOW_TRACKING_PASSWORD" = local.mlflow_password
"MLFLOW_SQLALCHEMYSTORE_POOL_CLASS" = "NullPool"
"MLFLOW_SQLALCHEMYSTORE_POOLCLASS" = "NullPool"
}
}
}
Expand Down

0 comments on commit b9623bd

Please sign in to comment.