dina1 commited on
Commit
2bd7c3c
·
verified ·
1 Parent(s): 526ae7f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -4,29 +4,27 @@
4
 
5
  FROM python:3.10-slim
6
 
7
- # Set working directory
8
  WORKDIR /app
9
 
10
- # Install system dependencies required by Playwright and fonts for PDF rendering
11
  RUN apt-get update && apt-get install -y \
12
- wget gnupg ca-certificates libxkbcommon0 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
 
13
  libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 \
14
  libasound2 libxshmfence1 libxext6 libxfixes3 libdrm2 fonts-liberation \
15
- libappindicator3-1 libnspr4 libvpx7 libx11-xcb1 libxrender1 \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # Copy and install Python dependencies
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # ✅ Install Playwright + Chromium dependencies
23
  RUN playwright install --with-deps chromium
24
 
25
- # Copy all project files
26
  COPY . .
27
 
28
- # Expose the default Hugging Face port
29
  EXPOSE 7860
30
 
31
- # Default command
32
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
4
 
5
  FROM python:3.10-slim
6
 
 
7
  WORKDIR /app
8
 
9
+ # Install system dependencies for Playwright + fonts (no libvpx7)
10
  RUN apt-get update && apt-get install -y \
11
+ wget gnupg ca-certificates \
12
+ libxkbcommon0 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
13
  libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 \
14
  libasound2 libxshmfence1 libxext6 libxfixes3 libdrm2 fonts-liberation \
15
+ libappindicator3-1 libnspr4 libx11-xcb1 libxrender1 \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Copy dependencies and install them
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # ✅ Install Playwright Chromium with all deps
23
  RUN playwright install --with-deps chromium
24
 
25
+ # Copy the app
26
  COPY . .
27
 
 
28
  EXPOSE 7860
29
 
 
30
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]