File size: 688 Bytes
c4da247
 
6143692
 
 
 
 
 
 
 
c4da247
6143692
 
c4da247
 
 
6143692
 
 
 
 
c4da247
 
 
6143692
c4da247
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
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"]