Skip to content

Instantly share code, notes, and snippets.

@ayqazi
Last active May 29, 2024 21:17
Show Gist options
  • Save ayqazi/0a9aba1e02769edffd96a9cb211f4d06 to your computer and use it in GitHub Desktop.
Save ayqazi/0a9aba1e02769edffd96a9cb211f4d06 to your computer and use it in GitHub Desktop.
MLflow on Kubernetes example
apiVersion: apps/v1
kind: Deployment
metadata:
name: mlflow
labels:
app: mlflow
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: mlflow
template:
metadata:
labels:
app: mlflow
spec:
containers:
- name: mlflow
image: 'ghcr.io/mlflow/mlflow:v2.13.0'
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5000
command: [ '/bin/sh' ]
args:
- '-c'
- "mlflow ui --host 0.0.0.0 --port 5000 --workers 1
--backend-store-uri sqlite:///data/mlflow/db.sqlite
--artifacts-destination /data/mlflow/artifacts
--default-artifact-root http://localhost:5000/api/2.0/mlflow-artifacts/artifacts/experiments"
envFrom:
- secretRef:
name: mlflow
volumeMounts:
- mountPath: '/artifacts'
name: mlflow-artifacts
volumes:
- name: mlflow-artifacts
hostPath:
path: '/data/mlflow/artifacts'
apiVersion: v1
kind: Service
metadata:
name: mlflow
labels:
app: mlflow
spec:
type: NodePort
ports:
- port: 5000
selector:
app: mlflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment