Commit aaaf3792 authored by 王国顺's avatar 王国顺

修改dockerfile

parent ff7b1813
# Version: 2.0.0 PaddleOCR-2.8.1 # Version: 2.0.0 PaddleOCR-2.8.1
FROM registry.baidubce.com/paddlepaddle/paddle:2.1.3 #FROM registry.baidubce.com/paddlepaddle/paddle:2.1.3
FROM registry.baidubce.com/paddlepaddle/paddle:2.0.0
ENV BASE_DIR="/PaddleOCR" ENV BASE_DIR="/PaddleOCR"
# PaddleOCR base on Python3.7 # PaddleOCR base on Python3.7
#RUN pip3.7 install --upgrade pip -i https://mirror.baidu.com/pypi/simple #RUN pip3.7 install --upgrade pip -i https://mirror.baidu.com/pypi/simple
RUN pip3.7 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple RUN pip3.7 install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
...@@ -14,7 +16,7 @@ RUN git clone http://gitlab.infoepoch.com/wanggs/paddleocr-2.8.1.git /PaddleOCR ...@@ -14,7 +16,7 @@ RUN git clone http://gitlab.infoepoch.com/wanggs/paddleocr-2.8.1.git /PaddleOCR
WORKDIR /PaddleOCR WORKDIR /PaddleOCR
#RUN pip3.7 install -r requirements.txt -i https://mirror.baidu.com/pypi/simple #RUN pip3.7 install -r requirements.txt -i https://mirror.baidu.com/pypi/simple
RUN pip3.7 install -r requirements.txt -i https://mirror.baidu.com/pypi/simple RUN pip3.7 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN mkdir -p /PaddleOCR/inference/ RUN mkdir -p /PaddleOCR/inference/
# 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) # 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)
...@@ -34,7 +36,7 @@ RUN tar xf /PaddleOCR/inference/ch_ppocr_mobile_v2.0_cls_infer.tar -C /PaddleOCR ...@@ -34,7 +36,7 @@ RUN tar xf /PaddleOCR/inference/ch_ppocr_mobile_v2.0_cls_infer.tar -C /PaddleOCR
ADD https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar /PaddleOCR/inference/ ADD https://paddleocr.bj.bcebos.com/PP-OCRv4/chinese/ch_PP-OCRv4_rec_infer.tar /PaddleOCR/inference/
RUN tar xf /PaddleOCR/inference/ch_PP-OCRv4_rec_infer.tar -C /PaddleOCR/inference/ RUN tar xf /PaddleOCR/inference/ch_PP-OCRv4_rec_infer.tar -C /PaddleOCR/inference/
RUN adduser -u 1000 --disabled-password gx \ RUN adduser -u 1000 --disabled-password --gecos "" gx \
&& chown -R gx:gx $BASE_DIR \ && chown -R gx:gx $BASE_DIR \
&& chmod -R 777 $BASE_DIR && chmod -R 777 $BASE_DIR
......
...@@ -26,7 +26,7 @@ def read_params(): ...@@ -26,7 +26,7 @@ def read_params():
# params for text detector # params for text detector
cfg.det_algorithm = "DB" cfg.det_algorithm = "DB"
cfg.det_model_dir = "./inference/ch_PP-OCRv4_det_infer/" cfg.det_model_dir = "./inference/ch_PP-OCRv3_det_infer/"
cfg.det_limit_side_len = 960 cfg.det_limit_side_len = 960
cfg.det_limit_type = "max" cfg.det_limit_type = "max"
...@@ -44,7 +44,7 @@ def read_params(): ...@@ -44,7 +44,7 @@ def read_params():
# params for text recognizer # params for text recognizer
cfg.rec_algorithm = "CRNN" cfg.rec_algorithm = "CRNN"
cfg.rec_model_dir = "./inference/ch_PP-OCRv4_rec_infer/" cfg.rec_model_dir = "./inference/ch_PP-OCRv3_rec_infer/"
cfg.rec_image_shape = "3, 48, 320" cfg.rec_image_shape = "3, 48, 320"
cfg.rec_batch_num = 6 cfg.rec_batch_num = 6
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment