Spaces:
Sleeping
Sleeping
| # ====== Étape 1 : Base ====== | |
| FROM python:3.12-slim | |
| # Éviter les prompts interactifs pendant l'installation | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN pip install --upgrade pip | |
| # ====== Étape 3 : Copier ton application ====== | |
| WORKDIR /app | |
| COPY . /app | |
| # Installer les dépendances de ton projet (si tu as un requirements.txt) | |
| RUN if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # ====== Étape 5 : Commande de lancement ====== | |
| # Exemple : si ton script principal est "app.py" et contient pn.serve(...) | |
| CMD ["panel", "serve", "app.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin=*"] |