service-internal commited on
Commit
57d2d00
·
verified ·
1 Parent(s): 11e1abe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -13
Dockerfile CHANGED
@@ -1,25 +1,50 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies required by Playwright
 
 
 
 
 
4
  RUN apt-get update && apt-get install -y \
5
- wget curl gnupg unzip libglib2.0-0 libnss3 libgconf-2-4 \
6
- libfontconfig1 libxss1 libasound2 libxtst6 libx11-xcb1 \
7
- libxcomposite1 libxcursor1 libxdamage1 libxrandr2 libxext6 \
8
- libxfixes3 libx11-6 libxcb1 libxinerama1 libpango-1.0-0 \
9
- libcairo2 libatk-bridge2.0-0 libgtk-3-0 libgbm1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- # Install Python dependencies
12
  COPY requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
 
14
 
15
- # Install Playwright browser binaries
16
  RUN playwright install chromium
17
 
18
- # Copy app code
19
- COPY . /app
20
- WORKDIR /app
 
21
 
22
- # Run the app
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
24
 
25
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Required to avoid some interactive prompts or issues
4
+ ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
5
+
6
+ WORKDIR /app
7
+
8
+ # Install system dependencies
9
  RUN apt-get update && apt-get install -y \
10
+ curl \
11
+ wget \
12
+ gnupg \
13
+ unzip \
14
+ fonts-liberation \
15
+ libnss3 \
16
+ libxss1 \
17
+ libasound2 \
18
+ libatk1.0-0 \
19
+ libatk-bridge2.0-0 \
20
+ libgtk-3-0 \
21
+ libdrm2 \
22
+ libgbm1 \
23
+ libxcomposite1 \
24
+ libxrandr2 \
25
+ libxdamage1 \
26
+ libxfixes3 \
27
+ libx11-xcb1 \
28
+ libxrender1 \
29
+ libxtst6 \
30
+ ca-certificates \
31
+ && rm -rf /var/lib/apt/lists/*
32
 
33
+ # Copy and install Python requirements
34
  COPY requirements.txt .
35
+ RUN pip install --no-cache-dir --upgrade pip && \
36
+ pip install --no-cache-dir -r requirements.txt
37
 
38
+ # Install Playwright with browser binaries
39
  RUN playwright install chromium
40
 
41
+ COPY . .
42
+
43
+
44
+
45
 
 
46
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
47
 
48
 
49
+
50
+