From 00e6e3f24f1c6475561e03799384567ab150959a Mon Sep 17 00:00:00 2001 From: Thomas Kosmas Date: Thu, 2 Jan 2025 14:48:26 +0200 Subject: [PATCH] Update Dockerfile and download_model.sh to streamline model downloads and fix paths --- Dockerfile | 3 ++- download_model.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d81aee3..66362df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,8 @@ RUN python3.10 download_models.py #serverless # CMD ["sh", "-c", "ls && python3.10 serverless.py"] -# RUN sh download_model.sh +#download paddleocr model +RUN sh download_model.sh CMD ["python3.10", "-m", "app.serverless"] diff --git a/download_model.sh b/download_model.sh index 6a48285..788ad36 100755 --- a/download_model.sh +++ b/download_model.sh @@ -45,12 +45,12 @@ download_and_extract() { # Download PP Detect Model to /root/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer/ download_and_extract "https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_det_infer.tar" \ - "/root/.paddleocr/whl/cls/ch_ppocr_mobile_v2.0_cls_infer/ch_ppocr_mobile_v2.0_cls_infer.tar" \ + "/root/.paddleocr/whl/cls/ch/ch_ppocr_mobile_v2.0_cls_infer/ch_ppocr_mobile_v2.0_cls_infer.tar" \ "PP Detect Model" # Download PP Rec Model to /root/.paddleocr/whl/rec/ch_ppocr_mobile_v2.0_rec_infer/ download_and_extract "https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar" \ - "/root/.paddleocr/whl/rec/ch_ppocr_mobile_v2.0_rec_infer/ch_ppocr_mobile_v2.0_rec_infer.tar" \ + "/root/.paddleocr/whl/rec/ch/ch_ppocr_mobile_v2.0_rec_infer/ch_ppocr_mobile_v2.0_rec_infer.tar" \ "PP Rec Model" # **New Addition**: Download PP Rec Model to /root/.paddleocr/whl/rec/ch/ch_PP-OCRv4_rec_infer/