Spaces:
Sleeping
Sleeping
Download Dockerfile from waliullah123/truth-detector-api: direct link, hf CLI and curl.
- Browser
- Download file 766 Bytes
-
https://huggingface.co/spaces/waliullah123/truth-detector-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/waliullah123/truth-detector-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/waliullah123/truth-detector-api/resolve/main/Dockerfile
766 Bytes
| FROM python:3.10-slim | |
| # Create a non-root user (required by Hugging Face Spaces) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /home/user/app | |
| # Install dependencies | |
| COPY --chown=user requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download NLTK data required by feature_extraction.py | |
| RUN python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('wordnet'); nltk.download('punkt_tab')" | |
| # Copy application files | |
| COPY --chown=user . ./ | |
| # Hugging Face Spaces exposes port 7860 | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| # Run with gunicorn for production | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "300", "app:app"] | |