Spaces:
Sleeping
Sleeping
unknown commited on
Commit ·
f4c46b4
1
Parent(s): 35abee2
fix
Browse files- Dockerfile +11 -8
Dockerfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
#
|
| 2 |
# Dockerfile for MassiveMark Clone
|
| 3 |
-
#
|
| 4 |
|
| 5 |
FROM python:3.11-slim
|
| 6 |
|
| 7 |
-
# --- Cài gói hệ thống
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git curl wget fonts-liberation libnss3 libxkbcommon0 libatk-bridge2.0-0 \
|
| 10 |
libxcomposite1 libxrandr2 libxdamage1 libxext6 libdrm2 libgbm1 libasound2 \
|
|
@@ -12,15 +12,18 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
libxml2 libxslt1.1 libffi-dev libssl-dev \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# ---
|
| 16 |
WORKDIR /app
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
-
# --- Cài các thư viện Python ---
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
# --- Cài Playwright
|
| 23 |
RUN python -m playwright install chromium --with-deps
|
| 24 |
|
| 25 |
-
# ---
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -------------------------------
|
| 2 |
# Dockerfile for MassiveMark Clone
|
| 3 |
+
# -------------------------------
|
| 4 |
|
| 5 |
FROM python:3.11-slim
|
| 6 |
|
| 7 |
+
# ---- Cài gói hệ thống cho Chromium ----
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git curl wget fonts-liberation libnss3 libxkbcommon0 libatk-bridge2.0-0 \
|
| 10 |
libxcomposite1 libxrandr2 libxdamage1 libxext6 libdrm2 libgbm1 libasound2 \
|
|
|
|
| 12 |
libxml2 libxslt1.1 libffi-dev libssl-dev \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# ---- Copy toàn bộ project ----
|
| 16 |
WORKDIR /app
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
+
# ---- Cài các thư viện Python ----
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
+
# ---- Cài đặt Playwright + Chromium ----
|
| 23 |
RUN python -m playwright install chromium --with-deps
|
| 24 |
|
| 25 |
+
# ---- Cấp quyền cache ----
|
| 26 |
+
ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright
|
| 27 |
+
|
| 28 |
+
# ---- Chạy ứng dụng ----
|
| 29 |
+
CMD ["python", "app.py"]
|