From bb6d9c3b47a39d63d9d15dc27c655c7014c1d80b Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Sat, 12 Oct 2024 13:13:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0pymupdf=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 ++++------ requirements.txt | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 40840e4..f00ae34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,14 +11,12 @@ ENV PYTHONUNBUFFERED=1 \ # 设置pip镜像地址,加快安装速度 PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple -# 安装库 -COPY sources.list /etc/apt/sources.list -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone \ - && apt-get update && apt-get install libgl1 - # 安装依赖 COPY requirements.txt /app/requirements.txt -RUN pip install --no-cache-dir -r requirements.txt +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone \ + && sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources \ + && apt-get update && apt-get install libgl1 -y \ + && pip install --no-cache-dir -r requirements.txt # 将当前目录内容复制到容器的/app内 COPY . /app diff --git a/requirements.txt b/requirements.txt index 63ab1a9..083749b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,7 @@ OpenCC==1.1.9 # 中文繁简转换 opencv-python==4.6.0.66 opencv-python-headless==4.10.0.84 pillow==10.4.0 +PyMuPDF==1.24.9 # pdf处理 pymysql==1.1.1 requests==2.32.3 sqlacodegen==2.3.0.post1 # 实体类生成