AnesKAM commited on
Commit
01acf55
·
verified ·
1 Parent(s): d63b8fb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -10
Dockerfile CHANGED
@@ -1,26 +1,34 @@
1
- FROM python:3.11-slim-bookworm
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies for Playwright + document libs
6
- RUN apt-get update && apt-get install -y --no-install-recommends \
7
- wget curl ca-certificates \
8
- libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
9
- libdrm2 libxcomposite1 libxdamage1 libxfixes3 \
10
- libxrandr2 libgbm1 libxss1 libasound2 \
11
- libpangocairo-1.0-0 libgtk-3-0 fonts-liberation \
 
 
 
 
 
 
 
 
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Install Chromium for Playwright (with deps)
18
  RUN playwright install chromium
19
  RUN playwright install-deps chromium
20
 
21
  COPY . .
22
 
23
- ENV PORT=7860
24
  EXPOSE 7860
25
 
26
  CMD ["python", "app.py"]
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies for playwright
6
+ RUN apt-get update && apt-get install -y \
7
+ wget \
8
+ gnupg \
9
+ libnss3 \
10
+ libatk-bridge2.0-0 \
11
+ libx11-xcb1 \
12
+ libxcomposite1 \
13
+ libxdamage1 \
14
+ libxfixes3 \
15
+ libxrandr2 \
16
+ libgbm1 \
17
+ libasound2 \
18
+ libpangocairo-1.0-0 \
19
+ libgtk-3-0 \
20
+ fonts-liberation \
21
  && rm -rf /var/lib/apt/lists/*
22
 
23
  COPY requirements.txt .
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Install Chromium for Playwright
27
  RUN playwright install chromium
28
  RUN playwright install-deps chromium
29
 
30
  COPY . .
31
 
 
32
  EXPOSE 7860
33
 
34
  CMD ["python", "app.py"]