service-internal commited on
Commit
bdea127
·
verified ·
1 Parent(s): a8febb3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -1,19 +1,24 @@
1
  FROM python:3.10-slim
2
 
3
- # Install dependencies
4
- RUN apt-get update && apt-get install -y wget curl gnupg unzip libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 libxss1 libasound2 libxtst6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxrandr2 libxext6 libxfixes3 libx11-6 libxcb1 libxinerama1 libpango-1.0-0 libcairo2 libatk-bridge2.0-0 libgtk-3-0
 
 
 
 
5
 
6
- # Copy files
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
- # Install Playwright dependencies
11
- RUN pip install playwright && playwright install chromium
12
 
13
- # Copy your app code
14
  COPY . /app
15
  WORKDIR /app
16
 
17
- # Run app
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
19
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies required by Playwright
4
+ RUN apt-get update && apt-get install -y wget curl gnupg unzip \
5
+ libglib2.0-0 libnss3 libgconf-2-4 libfontconfig1 libxss1 \
6
+ libasound2 libxtst6 libx11-xcb1 libxcomposite1 libxcursor1 \
7
+ libxdamage1 libxrandr2 libxext6 libxfixes3 libx11-6 libxcb1 \
8
+ libxinerama1 libpango-1.0-0 libcairo2 libatk-bridge2.0-0 libgtk-3-0
9
 
10
+ # Install Python dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Install Playwright and Chromium browser (CRITICAL)
15
+ RUN playwright install chromium
16
 
17
+ # Copy app code
18
  COPY . /app
19
  WORKDIR /app
20
 
21
+ # Start the FastAPI server
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
23
 
24
+