Spaces:
Sleeping
Sleeping
| # Lancer le serveur Redis en arrière-plan | |
| echo "Lancement de Redis..." | |
| redis-server --daemonize yes | |
| sleep 2 | |
| # Lancer le worker Celery en arrière-plan | |
| echo "Lancement du worker Celery..." | |
| celery -A tasks.worker_celery:celery_app worker --loglevel=info & | |
| # Lancer l'API FastAPI (le backend modèle) en arrière-plan | |
| echo "Lancement de l'API FastAPI..." | |
| uvicorn main:app --host 0.0.0.0 --port 8000 & | |
| # --- LIGNE CORRIGÉE --- | |
| # On lance gunicorn en tant que module python pour éviter les problèmes de PATH. | |
| echo "Lancement de l'application Flask sur le port 7860..." | |
| python -m gunicorn --bind 0.0.0.0:7860 --workers 1 --threads 8 --timeout 120 app:app |