Skip to content

Commit

Permalink
Update Dockerfile and download_model.sh to streamline model downloads…
Browse files Browse the repository at this point in the history
… and fix paths
  • Loading branch information
tomkosm committed Jan 2, 2025
1 parent 557d487 commit 00e6e3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions download_model.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 00e6e3f

Please sign in to comment.