Spaces:
Runtime error
Runtime error
| # Use official Python base image | |
| FROM python:3.10-slim | |
| # Set working directory inside the container | |
| WORKDIR /app | |
| # Copy all files to container | |
| COPY . /app | |
| # Install system dependencies (for PDF and NLP tools) | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| libffi-dev \ | |
| libssl-dev \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Download spaCy model (one-time) | |
| RUN python -m spacy download en_core_web_trf | |
| # Expose Streamlit default port | |
| EXPOSE 7860 | |
| # Streamlit needs these environment vars to run on Hugging Face | |
| ENV PORT=7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Run your app | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |