TP3 Parties 2-4 : API REST FastAPI (health, predict, batch, erreurs 404)

This commit is contained in:
Johan LEROY
2026-07-22 11:22:50 +02:00
parent 9a52395c91
commit b0bd6cdb07
6 changed files with 262 additions and 0 deletions

10
serve.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Lance l'API de prediction (TP03). A executer depuis la racine du depot (/home/user/tp).
# Charge .env (MLflow + creds S3 pour recuperer le modele promu depuis le Registry).
set -euo pipefail
cd "$(dirname "$0")"
set -a
# shellcheck disable=SC1091
source .env
set +a
exec /opt/venvs/mlops/bin/uvicorn lab.serving.api:app --host 0.0.0.0 --port 8000