playwright support

This commit is contained in:
朱潮 2026-03-16 23:07:00 +08:00
parent c27270588f
commit f24c3ff78f
2 changed files with 16 additions and 0 deletions

View File

@ -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 . .

View File

@ -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