Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IaC/modules/mlflow/secret_manager/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "google_secret_manager_secret" "secret" {
secret_id = var.secret_id

replication {
automatic = true
auto {}
}
}

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ set-project:
docker:
@echo
@echo "Remotely building mlflow server docker image"
@echo "This should take about 5 minutes, don't forget to stretch and hydrate ☕️"
@source vars && gcloud builds submit --tag $${TF_VAR_mlflow_docker_image} ./tracking_server $(OUTPUT_SUPPRESSOR)
@echo "Done"
@echo
Expand Down
38 changes: 32 additions & 6 deletions tracking_server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# Copyright (C) 2025 Artefact
# licence-information@artefact.com
#
# This program is free software; you can redistribute it and/or
Expand All @@ -15,18 +15,44 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
FROM google/cloud-sdk:332.0.0
FROM google/cloud-sdk:511.0.0


# Install Python 3.11
# Install necessary packages and add backports repository
RUN apt-get update && apt-get install -y software-properties-common \
&& echo "deb http://deb.debian.org/debian $(lsb_release -cs)-backports main" >> /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -y -t $(lsb_release -cs)-backports python3.11 python3.11-venv python3.11-dev python3-pip \
&& ln -s /usr/bin/python3.11 /usr/bin/python

# Clean up to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/*


# Explicitly allow release info change to avoid errors
RUN apt-get update --allow-releaseinfo-change --fix-missing\
&& apt-get -y install --no-install-recommends \
apt-transport-https \
ca-certificates \
gnupg \
default-libmysqlclient-dev \
libpq-dev \
build-essential \
curl \
pkg-config

WORKDIR /mlflow/

RUN mkdir -p /mlflow/ \
&& apt-get update --allow-releaseinfo-change\
&& apt-get -y install --no-install-recommends apt-transport-https \
ca-certificates gnupg default-libmysqlclient-dev libpq-dev build-essential curl
# Ensure subsequent commands use the virtual environment
RUN python -m venv /env
ENV PATH="/env/bin:$PATH"

COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt


COPY run_tracking.sh .
RUN chmod +x run_tracking.sh

Expand Down
7 changes: 7 additions & 0 deletions tracking_server/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mlflow==2.20.2
sqlalchemy==2.0.38
boto3==2.0.38
google-cloud-storage==3.0.0
psycopg2==2.9.10
mysql==0.0.3
pymysql==1.1.1
246 changes: 239 additions & 7 deletions tracking_server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,239 @@
mlflow==1.11.0
sqlalchemy==1.3.13
boto3==1.14.62
google-cloud-storage==1.31.0
psycopg2==2.8.6
mysql==0.0.2
pymysql==0.10.1
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
#
alembic==1.14.1
# via mlflow
annotated-types==0.7.0
# via pydantic
blinker==1.9.0
# via flask
boto3==1.36.20
# via -r requirements.in
botocore==1.36.20
# via
# boto3
# s3transfer
cachetools==5.5.1
# via
# google-auth
# mlflow-skinny
certifi==2025.1.31
# via requests
charset-normalizer==3.4.1
# via requests
click==8.1.8
# via
# flask
# mlflow-skinny
cloudpickle==3.1.1
# via mlflow-skinny
contourpy==1.3.1
# via matplotlib
cycler==0.12.1
# via matplotlib
databricks-sdk==0.44.1
# via mlflow-skinny
deprecated==1.2.18
# via
# opentelemetry-api
# opentelemetry-semantic-conventions
docker==7.1.0
# via mlflow
flask==3.1.0
# via mlflow
fonttools==4.56.0
# via matplotlib
gitdb==4.0.12
# via gitpython
gitpython==3.1.44
# via mlflow-skinny
google-api-core==2.24.1
# via
# google-cloud-core
# google-cloud-storage
google-auth==2.38.0
# via
# databricks-sdk
# google-api-core
# google-cloud-core
# google-cloud-storage
google-cloud-core==2.4.1
# via google-cloud-storage
google-cloud-storage==3.0.0
# via -r requirements.in
google-crc32c==1.6.0
# via
# google-cloud-storage
# google-resumable-media
google-resumable-media==2.7.2
# via google-cloud-storage
googleapis-common-protos==1.67.0
# via google-api-core
graphene==3.4.3
# via mlflow
graphql-core==3.2.6
# via
# graphene
# graphql-relay
graphql-relay==3.2.0
# via graphene
greenlet==3.1.1
# via sqlalchemy
gunicorn==23.0.0
# via mlflow
idna==3.10
# via requests
importlib-metadata==8.5.0
# via
# mlflow-skinny
# opentelemetry-api
itsdangerous==2.2.0
# via flask
jinja2==3.1.5
# via
# flask
# mlflow
jmespath==1.0.1
# via
# boto3
# botocore
joblib==1.4.2
# via scikit-learn
kiwisolver==1.4.8
# via matplotlib
mako==1.3.9
# via alembic
markdown==3.7
# via mlflow
markupsafe==3.0.2
# via
# jinja2
# mako
# werkzeug
matplotlib==3.10.0
# via mlflow
mlflow==2.20.2
# via -r requirements.in
mlflow-skinny==2.20.2
# via mlflow
mysql==0.0.3
# via -r requirements.in
mysqlclient==2.2.7
# via mysql
numpy==2.2.3
# via
# contourpy
# matplotlib
# mlflow
# pandas
# scikit-learn
# scipy
opentelemetry-api==1.30.0
# via
# mlflow-skinny
# opentelemetry-sdk
# opentelemetry-semantic-conventions
opentelemetry-sdk==1.30.0
# via mlflow-skinny
opentelemetry-semantic-conventions==0.51b0
# via opentelemetry-sdk
packaging==24.2
# via
# gunicorn
# matplotlib
# mlflow-skinny
pandas==2.2.3
# via mlflow
pillow==11.1.0
# via matplotlib
proto-plus==1.26.0
# via google-api-core
protobuf==5.29.3
# via
# google-api-core
# googleapis-common-protos
# mlflow-skinny
# proto-plus
psycopg2==2.9.10
# via -r requirements.in
pyarrow==18.1.0
# via mlflow
pyasn1==0.6.1
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.4.1
# via google-auth
pydantic==2.10.6
# via mlflow-skinny
pydantic-core==2.27.2
# via pydantic
pymysql==1.1.1
# via -r requirements.in
pyparsing==3.2.1
# via matplotlib
python-dateutil==2.9.0.post0
# via
# botocore
# graphene
# matplotlib
# pandas
pytz==2025.1
# via pandas
pyyaml==6.0.2
# via mlflow-skinny
requests==2.32.3
# via
# databricks-sdk
# docker
# google-api-core
# google-cloud-storage
# mlflow-skinny
rsa==4.9
# via google-auth
s3transfer==0.11.2
# via boto3
scikit-learn==1.6.1
# via mlflow
scipy==1.15.1
# via
# mlflow
# scikit-learn
six==1.17.0
# via python-dateutil
smmap==5.0.2
# via gitdb
sqlalchemy==2.0.38
# via
# -r requirements.in
# alembic
# mlflow
sqlparse==0.5.3
# via mlflow-skinny
threadpoolctl==3.5.0
# via scikit-learn
typing-extensions==4.12.2
# via
# alembic
# graphene
# mlflow-skinny
# opentelemetry-sdk
# pydantic
# pydantic-core
# sqlalchemy
tzdata==2025.1
# via pandas
urllib3==2.3.0
# via
# botocore
# docker
# requests
werkzeug==3.1.3
# via flask
wrapt==1.17.2
# via deprecated
zipp==3.21.0
# via importlib-metadata
2 changes: 1 addition & 1 deletion tracking_server/run_tracking.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# GNU Lesser General Public License v3.0 only
# Copyright (C) 2020 Artefact
# licence-information@artefact.com
Expand All @@ -15,7 +16,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#!/bin/bash

DB_PASSWORD=$(gcloud beta secrets versions access --project=${GCP_PROJECT} --secret=${DB_PASSWORD_NAME} latest)
BACKEND_URI=mysql+pymysql://${DB_USERNAME}:${DB_PASSWORD}@${DB_PRIVATE_IP}:3306/${DB_NAME}
Expand Down
Loading