TP3 Parties 2-4 : API REST FastAPI (health, predict, batch, erreurs 404)
This commit is contained in:
10
serve.sh
Executable file
10
serve.sh
Executable 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
|
||||
Reference in New Issue
Block a user