From 788b6c9a200c3b26cab5c7a92638ecd46cf36f00 Mon Sep 17 00:00:00 2001 From: Linzhi Xie Date: Mon, 18 Dec 2023 17:34:31 +0800 Subject: [PATCH 1/3] chore: add notes for docker gpu deploy PP-OCRv4 --- deploy/docker/hubserving/gpu/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy/docker/hubserving/gpu/Dockerfile b/deploy/docker/hubserving/gpu/Dockerfile index b3f2d21ffe..e8d6a11c50 100644 --- a/deploy/docker/hubserving/gpu/Dockerfile +++ b/deploy/docker/hubserving/gpu/Dockerfile @@ -6,6 +6,7 @@ RUN pip3.7 install --upgrade pip -i https://mirror.baidu.com/pypi/simple RUN pip3.7 install paddlehub --upgrade -i https://mirror.baidu.com/pypi/simple +# If you want to use PP-OCRv4. You need to modify the `model_dir` fields in the file of `deploy/hubserving/ocr_system/params.py` RUN git clone https://github.com/PaddlePaddle/PaddleOCR.git /PaddleOCR WORKDIR /PaddleOCR @@ -13,6 +14,9 @@ WORKDIR /PaddleOCR RUN pip3.7 install -r requirements.txt -i https://mirror.baidu.com/pypi/simple RUN mkdir -p /PaddleOCR/inference/ + +# Tip: You can download models from https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md + # Download orc detect model(light version). if you want to change normal version, you can change ch_ppocr_mobile_v2.0_det_infer to ch_ppocr_server_v2.0_det_infer, also remember change det_model_dir in deploy/hubserving/ocr_system/params.py) ADD {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ @@ -27,4 +31,4 @@ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ EXPOSE 8868 -CMD ["/bin/bash","-c","hub install deploy/hubserving/ocr_system/ && hub serving start -m ocr_system"] \ No newline at end of file +CMD ["/bin/bash","-c","hub install deploy/hubserving/ocr_system/ && hub serving start -m ocr_system"] From 6a01ecfc0fc56694bc6ee05089b3b5fa271a2013 Mon Sep 17 00:00:00 2001 From: Linzhi Xie Date: Fri, 22 Dec 2023 09:50:51 +0800 Subject: [PATCH 2/3] chore: add notes for docker gpu deploy PP-OCRv4 --- deploy/docker/hubserving/gpu/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/docker/hubserving/gpu/Dockerfile b/deploy/docker/hubserving/gpu/Dockerfile index e8d6a11c50..bc5bd88b34 100644 --- a/deploy/docker/hubserving/gpu/Dockerfile +++ b/deploy/docker/hubserving/gpu/Dockerfile @@ -18,15 +18,15 @@ RUN mkdir -p /PaddleOCR/inference/ # Tip: You can download models from https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md # Download orc detect model(light version). if you want to change normal version, you can change ch_ppocr_mobile_v2.0_det_infer to ch_ppocr_server_v2.0_det_infer, also remember change det_model_dir in deploy/hubserving/ocr_system/params.py) -ADD {link} /PaddleOCR/inference/ +COPY {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ # Download direction classifier(light version). If you want to change normal version, you can change ch_ppocr_mobile_v2.0_cls_infer to ch_ppocr_mobile_v2.0_cls_infer, also remember change cls_model_dir in deploy/hubserving/ocr_system/params.py) -ADD {link} /PaddleOCR/inference/ -RUN tar xf /PaddleOCR/inference/{file} -C /PaddleOCR/inference/ +COPY {link} /PaddleOCR/inference/ +RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ # Download orc recognition model(light version). If you want to change normal version, you can change ch_ppocr_mobile_v2.0_rec_infer to ch_ppocr_server_v2.0_rec_infer, also remember change rec_model_dir in deploy/hubserving/ocr_system/params.py) -ADD {link} /PaddleOCR/inference/ +COPY {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ EXPOSE 8868 From 9851f5698650ad4726befc788b97ee1dbb9fbe65 Mon Sep 17 00:00:00 2001 From: sheiy Date: Thu, 28 Dec 2023 17:36:12 +0800 Subject: [PATCH 3/3] Update Dockerfile --- deploy/docker/hubserving/gpu/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/docker/hubserving/gpu/Dockerfile b/deploy/docker/hubserving/gpu/Dockerfile index bc5bd88b34..d51e3c38b9 100644 --- a/deploy/docker/hubserving/gpu/Dockerfile +++ b/deploy/docker/hubserving/gpu/Dockerfile @@ -18,15 +18,15 @@ RUN mkdir -p /PaddleOCR/inference/ # Tip: You can download models from https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md # Download orc detect model(light version). if you want to change normal version, you can change ch_ppocr_mobile_v2.0_det_infer to ch_ppocr_server_v2.0_det_infer, also remember change det_model_dir in deploy/hubserving/ocr_system/params.py) -COPY {link} /PaddleOCR/inference/ +ADD {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ # Download direction classifier(light version). If you want to change normal version, you can change ch_ppocr_mobile_v2.0_cls_infer to ch_ppocr_mobile_v2.0_cls_infer, also remember change cls_model_dir in deploy/hubserving/ocr_system/params.py) -COPY {link} /PaddleOCR/inference/ +ADD {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ # Download orc recognition model(light version). If you want to change normal version, you can change ch_ppocr_mobile_v2.0_rec_infer to ch_ppocr_server_v2.0_rec_infer, also remember change rec_model_dir in deploy/hubserving/ocr_system/params.py) -COPY {link} /PaddleOCR/inference/ +ADD {link} /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/{file}.tar -C /PaddleOCR/inference/ EXPOSE 8868