Spaces:
Sleeping
Sleeping
File size: 660 Bytes
14698a2 54969e3 18a8341 14698a2 ff39e1a 18a8341 ff39e1a 14698a2 9b8218b 6f1635e ff39e1a b261a92 6f1635e 14698a2 6f1635e 14698a2 ff39e1a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # ====== É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=*"] |