Fix MLflow DB driver and add DinD sidecar to Gitea Runner

This commit is contained in:
fchinembiri 2026-04-24 00:57:47 +02:00
parent a7f2dba8b2
commit 87f65684ec
2 changed files with 17 additions and 48 deletions

View File

@ -23,17 +23,23 @@ spec:
value: "3daF7zwBC94Q5YCb1mW1VnfPi4L7pgMxSHhKOBOn" value: "3daF7zwBC94Q5YCb1mW1VnfPi4L7pgMxSHhKOBOn"
- name: GITEA_RUNNER_NAME - name: GITEA_RUNNER_NAME
value: "k3s-runner" value: "k3s-runner"
- name: GITEA_RUNNER_LABELS - name: DOCKER_HOST
value: "ubuntu-latest:docker://node:16-bullseye,ubuntu-22.04:docker://node:16-bullseye" value: tcp://localhost:2375
securityContext:
privileged: true # Required for Docker-in-Docker
volumeMounts: volumeMounts:
- name: docker-certs
mountPath: /certs
- name: runner-data - name: runner-data
mountPath: /data mountPath: /data
- name: dind
image: docker:dind
securityContext:
privileged: true
env:
- name: DOCKER_TLS_CERTDIR
value: ""
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
volumes: volumes:
- name: docker-certs
emptyDir: {}
- name: runner-data - name: runner-data
emptyDir: {} emptyDir: {}
- name: docker-graph-storage
emptyDir: {}

View File

@ -15,13 +15,14 @@ spec:
spec: spec:
containers: containers:
- name: mlflow - name: mlflow
image: ghcr.io/mlflow/mlflow:v2.10.2 # Using a version that is known to work with postgres
image: ghcr.io/mlflow/mlflow:v2.12.1
command: command:
- mlflow - mlflow
- server - server
- --host=0.0.0.0 - --host=0.0.0.0
- --port=5000 - --port=5000
- --backend-store-uri=postgresql://postgres:$(DB_PASSWORD)@geocrop-db:5433/geocrop_gis - --backend-store-uri=postgresql+psycopg2://postgres:$(DB_PASSWORD)@geocrop-db:5432/geocrop_gis
- --default-artifact-root=s3://geocrop-models/mlflow-artifacts - --default-artifact-root=s3://geocrop-models/mlflow-artifacts
env: env:
- name: DB_PASSWORD - name: DB_PASSWORD
@ -43,41 +44,3 @@ spec:
value: http://minio.geocrop.svc.cluster.local:9000 value: http://minio.geocrop.svc.cluster.local:9000
ports: ports:
- containerPort: 5000 - containerPort: 5000
# No resource limits defined to allow maximum utilization during heavy training syncs
---
apiVersion: v1
kind: Service
metadata:
name: mlflow
namespace: geocrop
spec:
ports:
- port: 5000
targetPort: 5000
selector:
app: mlflow
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mlflow-ingress
namespace: geocrop
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: nginx
tls:
- hosts:
- ml.techarvest.co.zw
secretName: mlflow-tls
rules:
- host: ml.techarvest.co.zw
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: mlflow
port:
number: 5000