Docker is the contract
One artefact, anywhere
mlflow models build-docker \
-m 'models:/credit-scoring/Production' \
-n credit-scoring:latest
What you get is a self-contained image with the model, its Python environment, the MLflow scoring server, and a documented /invocations endpoint. Push it to ECR/GCR/ACR and you can run it on ECS, GKE, AKS, Kubernetes, Cloud Run — anywhere.
Production checklist
- Pin the base image (
--base-image python:3.11-slim). - Run as non-root (
USER 1000). - Add a readiness probe on
/ping, liveness on/health. - Set resource requests/limits — model memory is sticky.
- Log to STDOUT only; the platform aggregates.