soffice sharp 支持
This commit is contained in:
commit
3c01f9c245
@ -8,7 +8,7 @@ WORKDIR /app
|
|||||||
ENV PYTHONPATH=/app
|
ENV PYTHONPATH=/app
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
# 安装系统依赖
|
# 安装系统依赖(含 LibreOffice 和 sharp 所需的 libvips)
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
wget \
|
wget \
|
||||||
@ -17,6 +17,11 @@ RUN apt-get update && apt-get install -y \
|
|||||||
libpq-dev \
|
libpq-dev \
|
||||||
chromium \
|
chromium \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
libreoffice-writer-nogui \
|
||||||
|
libreoffice-calc-nogui \
|
||||||
|
libreoffice-impress-nogui \
|
||||||
|
libvips-dev \
|
||||||
|
fonts-noto-cjk \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 安装Node.js (支持npx命令)
|
# 安装Node.js (支持npx命令)
|
||||||
@ -36,7 +41,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
# 安装 Playwright 并下载 Chromium
|
# 安装 Playwright 并下载 Chromium
|
||||||
RUN pip install --no-cache-dir playwright && \
|
RUN pip install --no-cache-dir playwright && \
|
||||||
playwright install chromium
|
playwright install chromium
|
||||||
RUN npm install -g playwright && \
|
RUN npm install -g playwright sharp && \
|
||||||
npx playwright install chromium
|
npx playwright install chromium
|
||||||
|
|
||||||
# 复制应用代码
|
# 复制应用代码
|
||||||
|
|||||||
@ -8,7 +8,7 @@ WORKDIR /app
|
|||||||
ENV PYTHONPATH=/app
|
ENV PYTHONPATH=/app
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
# 安装系统依赖
|
# 安装系统依赖(含 LibreOffice 和 sharp 所需的 libvips)
|
||||||
RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources && \
|
RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources && \
|
||||||
apt-get update && apt-get install -y \
|
apt-get update && apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
@ -18,6 +18,11 @@ RUN sed -i 's|http://deb.debian.org|http://mirrors.aliyun.com|g' /etc/apt/source
|
|||||||
libpq-dev \
|
libpq-dev \
|
||||||
chromium \
|
chromium \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
libreoffice-writer-nogui \
|
||||||
|
libreoffice-calc-nogui \
|
||||||
|
libreoffice-impress-nogui \
|
||||||
|
libvips-dev \
|
||||||
|
fonts-noto-cjk \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 安装Node.js (支持npx命令)
|
# 安装Node.js (支持npx命令)
|
||||||
@ -37,7 +42,7 @@ RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ -r req
|
|||||||
# 安装 Playwright 并下载 Chromium
|
# 安装 Playwright 并下载 Chromium
|
||||||
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ playwright && \
|
RUN pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ playwright && \
|
||||||
playwright install chromium
|
playwright install chromium
|
||||||
RUN npm install -g playwright && \
|
RUN npm install -g playwright sharp && \
|
||||||
npx playwright install chromium
|
npx playwright install chromium
|
||||||
|
|
||||||
# 安装modelscope
|
# 安装modelscope
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user