Containerize an ML model
Package ML models for deployment
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Write a Dockerfile to containerize a Python ML model serving API built with FastAPI. The model is loaded from [model path], uses [list dependencies], and exposes a /predict endpoint. Optimize the image for size using multi-stage builds, pin all dependency versions, and add a health check endpoint.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Use Cases
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Pour éviter d'alourdir l'image, montez le modèle via un volume Docker ou téléchargez‑le au démarrage plutôt que de le copier. Ajoutez un `.dockerignore` pour exclure le cache pip et les fichiers inutiles.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.