From f24c3ff78f7303c4d7242d90fbd89a360842bc5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Mon, 16 Mar 2026 23:07:00 +0800 Subject: [PATCH] playwright support --- Dockerfile | 8 ++++++++ Dockerfile.modelscope | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/Dockerfile b/Dockerfile index fe79e61..599efff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,14 @@ ENV PATH="/root/.cargo/bin:$PATH" COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt +# 安装 Python 版本 Playwright 并下载 Chromium +RUN pip install --no-cache-dir playwright && \ + playwright install --with-deps chromium + +# 安装 Node.js 版本 Playwright 并下载 Chromium +RUN npm install -g playwright && \ + npx playwright install chromium + # 复制应用代码 COPY . . diff --git a/Dockerfile.modelscope b/Dockerfile.modelscope index 7202faa..02b1dbe 100644 --- a/Dockerfile.modelscope +++ b/Dockerfile.modelscope @@ -32,6 +32,14 @@ ENV PATH="/root/.cargo/bin:$PATH" COPY requirements.txt . RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt +# 安装 Python 版本 Playwright 并下载 Chromium +RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ playwright && \ + playwright install --with-deps chromium + +# 安装 Node.js 版本 Playwright 并下载 Chromium +RUN npm install -g playwright && \ + npx playwright install chromium + # 安装modelscope #RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ modelscope