Spaces:
Sleeping
Sleeping
File size: 858 Bytes
bb8d932 626deb4 bb8d932 626deb4 bb8d932 626deb4 bb8d932 626deb4 bb8d932 626deb4 bb8d932 626deb4 bb8d932 626deb4 bb8d932 96bfc0a bb8d932 626deb4 bb8d932 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # Use a lightweight Python image
FROM python:3.12-slim
# Set working directory
WORKDIR /code
# Install system dependencies (optional but useful)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy all project files
COPY . /code
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Download NLTK data
RUN python -m nltk.downloader stopwords wordnet
# Hugging Face requires exposing port 7860 (even if Streamlit uses others)
EXPOSE 7860
# Streamlit by default runs on port 8501 — must override for HF Spaces
ENV PORT=7860
# Disable Streamlit telemetry & browser auto-open
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_SERVER_HEADLESS=true
# Command to run the app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|