-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_project.sh
More file actions
38 lines (27 loc) · 763 Bytes
/
Copy pathrun_project.sh
File metadata and controls
38 lines (27 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
function info {
echo -e "\033[1;34m[INFO]\033[0m $1"
}
function error {
echo -e "\033[1;31m[ERREUR]\033[0m $1"
}
ENV_DIR="reco_env"
if [ ! -d "$ENV_DIR" ]; then
info "Création de l'environnement virtuel '$ENV_DIR'..."
python -m venv $ENV_DIR
else
info "L'environnement virtuel '$ENV_DIR' existe déjà."
fi
source $ENV_DIR/Scripts/activate
info "Mise à jour de pip..."
python.exe -m pip install --upgrade pip
info "Installation des dépendances..."
pip install -r requirements.txt
info "Lancement de l'API FastAPI..."
uvicorn api.main:app --host 0.0.0.0 --port 8000 &
API_PID=$!
info "Lancement de l'application Streamlit..."
streamlit run frontend/app.py &
info "Tous les services sont lancés."
wait $API_PID