Last active
May 29, 2024 21:17
-
-
Save ayqazi/0a9aba1e02769edffd96a9cb211f4d06 to your computer and use it in GitHub Desktop.
MLflow on Kubernetes example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TITLE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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