Spaces:
Sleeping
Sleeping
unknown commited on
Commit ·
c046e3e
1
Parent(s): cb83d61
fix
Browse files- Dockerfile +15 -14
Dockerfile
CHANGED
|
@@ -1,22 +1,23 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
#
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
RUN
|
| 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 |
-
#
|
| 18 |
-
|
| 19 |
|
| 20 |
-
#
|
| 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"]
|
|
|