From 2a93ef91d85d3605f7d69ffb1d1a007b98bd9401 Mon Sep 17 00:00:00 2001 From: ProseGuys <798770222@qq.com> Date: Wed, 13 Nov 2024 15:31:17 +0800 Subject: [PATCH] [chore] udpate DockerFile to fix build bugs --- Dockerfile | 13 +++++-------- requirements-docker.txt | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 870432d7..59b3c2b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,16 +32,13 @@ RUN /bin/bash -c "source /opt/mineru_venv/bin/activate && \ pip3 install --upgrade pip && \ wget https://gitee.com/myhloli/MinerU/raw/master/requirements-docker.txt && \ pip3 install -r requirements-docker.txt --extra-index-url https://wheels.myhloli.com -i https://mirrors.aliyun.com/pypi/simple && \ - pip3 install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/" - -# Copy the configuration file template and install magic-pdf latest -RUN /bin/bash -c "wget https://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json && \ - cp magic-pdf.template.json /root/magic-pdf.json && \ - source /opt/mineru_venv/bin/activate && \ + pip3 install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/ && \ pip3 install -U magic-pdf" -# Download models and update the configuration file -RUN /bin/bash -c "pip3 install modelscope && \ +# Copy the configuration file template and download models and update the configuration file +RUN /bin/bash -c "source /opt/mineru_venv/bin/activate && \ + wget https://gitee.com/myhloli/MinerU/raw/master/magic-pdf.template.json && \ + cp magic-pdf.template.json /root/magic-pdf.json && \ wget https://gitee.com/myhloli/MinerU/raw/master/scripts/download_models.py && \ python3 download_models.py && \ sed -i 's|cpu|cuda|g' /root/magic-pdf.json" diff --git a/requirements-docker.txt b/requirements-docker.txt index 34fd61e2..27c5d32c 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -20,3 +20,4 @@ rapidocr-paddle rapid_table doclayout-yolo==0.0.2 detectron2 +modelscope \ No newline at end of file