Spaces:
Runtime error
Runtime error
Download Dockerfile from ghizlaneimane/mon-api-fastapi: direct link, hf CLI and curl.
- Browser
- Download file 616 Bytes
-
https://huggingface.co/spaces/ghizlaneimane/mon-api-fastapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ghizlaneimane/mon-api-fastapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ghizlaneimane/mon-api-fastapi/resolve/main/Dockerfile
616 Bytes
| # Utilise une image de base avec Python 3.12 | |
| FROM python:3.12 | |
| # Créer un répertoire pour les assets si nécessaire | |
| RUN mkdir -p /app/assete | |
| # Définit le répertoire de travail | |
| WORKDIR /app | |
| # Copier tous les fichiers nécessaires | |
| COPY main.py /app/ | |
| COPY prj.html /app/ | |
| COPY prj.js /app/ | |
| COPY prj.css /app/ | |
| COPY requirements.txt /app/ | |
| # Installer les dépendances Python | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # Expose le port 8000 (port par défaut de FastAPI) | |
| EXPOSE 8000 | |
| # Commande pour lancer l'application | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |