DarmacSEO commited on
Commit
6143692
·
verified ·
1 Parent(s): 712a035

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -0
Dockerfile CHANGED
@@ -1,10 +1,26 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
6
 
 
 
 
 
 
7
  COPY . .
8
 
9
  EXPOSE 7860
 
10
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ ENV PYTHONUNBUFFERED=1 \
4
+ PORT=7860
5
+
6
+ # Podstawowe narzędzia i zależności systemowe
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ wget curl git ca-certificates \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
  WORKDIR /app
12
+
13
+ # Python deps
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Instalacja przeglądarek Playwright + system deps (Chromium)
18
+ # --with-deps zapewnia brakujących bibliotek w slimie.
19
+ RUN python -m playwright install --with-deps chromium
20
+
21
+ # Kod aplikacji
22
  COPY . .
23
 
24
  EXPOSE 7860
25
+ # uruchamiamy FastAPI na porcie wymaganym przez Spaces
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]