Spaces:
Sleeping
Sleeping
| # 1. Match your local Python version | |
| FROM python:3.12-slim | |
| # 2. Install uv | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | |
| WORKDIR /app | |
| # 3. Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 4. Copy and install dependencies | |
| COPY pyproject.toml uv.lock ./ | |
| RUN uv pip install --system --no-cache -r pyproject.toml | |
| # 5. Pre-download NLTK data (Matches your app.py list) | |
| RUN python3 -m nltk.downloader stopwords wordnet omw-1.4 punkt_tab averaged_perceptron_tagger_eng | |
| # 6. Copy the rest of the code | |
| COPY . . | |
| EXPOSE 7860 | |
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false", "--server.enableCORS=false", "--server.maxUploadSize=500"] |