crawl4ai / Dockerfile
DarmacSEO's picture
Update Dockerfile
6143692 verified
FROM python:3.10-slim
ENV PYTHONUNBUFFERED=1 \
PORT=7860
# Podstawowe narzędzia i zależności systemowe
RUN apt-get update && apt-get install -y --no-install-recommends \
wget curl git ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Instalacja przeglądarek Playwright + system deps (Chromium)
# --with-deps zapewnia brakujących bibliotek w slimie.
RUN python -m playwright install --with-deps chromium
# Kod aplikacji
COPY . .
EXPOSE 7860
# uruchamiamy FastAPI na porcie wymaganym przez Spaces
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]