college-scraper / Dockerfile
sharanyaswarup's picture
Initial commit: AISHE College Data Scraper v1.0
72acc1c
Raw
History Blame Contribute Delete
1.08 kB
# ── Base image ────────────────────────────────────────────────────────────────
FROM python:3.11-slim
# Needed for Playwright Chromium + system deps
RUN apt-get update && apt-get install -y \
wget curl gnupg ca-certificates \
libglib2.0-0 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 \
libxrandr2 libgbm1 libasound2 libpango-1.0-0 libcairo2 \
&& 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
# Install Playwright's Chromium browser
RUN playwright install chromium
RUN playwright install-deps chromium
# Copy application code
COPY . .
# Create output directories
RUN mkdir -p output/downloads output_excel config
# HuggingFace Spaces runs as port 7860
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
CMD ["python", "app.py"]