Files
burmddit/backend/Dockerfile
2026-02-19 19:18:35 +08:00

26 lines
609 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for newspaper3k and psycopg2
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libxml2-dev \
libxslt1-dev \
libjpeg-dev \
zlib1g-dev \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements-pipeline.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Download NLTK data needed by newspaper3k
RUN python -c "import nltk; nltk.download('punkt_tab', quiet=True)"
# Copy application code
COPY . .
CMD ["python", "run_pipeline.py"]