unknown commited on
Commit
c046e3e
·
1 Parent(s): cb83d61
Files changed (1) hide show
  1. Dockerfile +15 -14
Dockerfile CHANGED
@@ -1,22 +1,23 @@
1
- # ========== Base image ==========
2
  FROM python:3.11-slim
3
 
4
- # ========== Set working directory ==========
5
- WORKDIR /app
 
 
 
 
 
6
 
7
- # ========== Copy project files ==========
 
8
  COPY . .
9
 
10
- # ========== Install system dependencies ==========
11
- RUN apt-get update && \
12
- apt-get install -y pandoc chromium libpango-1.0-0 libgdk-pixbuf-2.0-0 libffi-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev && \
13
- pip install --no-cache-dir -r requirements.txt && \
14
- pip install playwright && \
15
- python -m playwright install chromium --with-deps
16
 
17
- # ========== Expose Flask port ==========
18
- EXPOSE 7860
19
 
20
- # ========== Run app ==========
21
  CMD ["python", "app.py"]
22
-
 
1
+ # ---- Base image ----
2
  FROM python:3.11-slim
3
 
4
+ # ---- Install system dependencies ----
5
+ RUN apt-get update && apt-get install -y \
6
+ git curl wget fonts-liberation libnss3 libatk-bridge2.0-0 \
7
+ libxkbcommon0 libxcomposite1 libxrandr2 libxdamage1 libxext6 \
8
+ libdrm2 libgbm1 libasound2 libpango-1.0-0 libpangocairo-1.0-0 \
9
+ libgtk-3-0 libxshmfence1 libglib2.0-0 libxml2 libxslt1.1 libffi-dev \
10
+ && rm -rf /var/lib/apt/lists/*
11
 
12
+ # ---- Copy project ----
13
+ WORKDIR /app
14
  COPY . .
15
 
16
+ # ---- Install Python deps ----
17
+ RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
18
 
19
+ # ---- Install Playwright browsers ----
20
+ RUN python -m playwright install chromium --with-deps
21
 
22
+ # ---- Run app ----
23
  CMD ["python", "app.py"]