Spaces:
Sleeping
Sleeping
Download Dockerfile from Datartiste/askpdf: direct link, hf CLI and curl.
- Browser
- Download file 839 Bytes
-
https://huggingface.co/spaces/Datartiste/askpdf/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Datartiste/askpdf/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Datartiste/askpdf/resolve/main/Dockerfile
839 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Installer les dépendances système | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Configurer Streamlit pour utiliser /tmp | |
| ENV STREAMLIT_SERVER_HEADLESS=true | |
| ENV STREAMLIT_SERVER_PORT=7860 | |
| ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 | |
| ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
| ENV HOME=/tmp | |
| # Copier les fichiers de dépendances | |
| COPY requirements.txt . | |
| # Installer les dépendances Python | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copier le reste de l'application | |
| COPY . . | |
| # Exposer le port 7860 (requis par Hugging Face) | |
| EXPOSE 7860 | |
| # Commande de démarrage | |
| CMD ["python", "-m", "streamlit", "run", "chatbot.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"] | |