newspaper-api / Dockerfile
gohilnath2's picture
Fix: add rater.py to Dockerfile
1e8450f
raw
history blame contribute delete
631 Bytes
FROM python:3.11-slim
# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first (cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY config.py .
COPY extractor.py .
COPY summarizer.py .
COPY rater.py .
COPY api.py .
# Create upload directory
RUN mkdir -p /tmp/newspaper_uploads
# HuggingFace Spaces requires port 7860
EXPOSE 7860
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]