Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paddleocr nvidia 镜像 #72

Open
tiancheng91 opened this issue Jun 17, 2023 · 0 comments
Open

paddleocr nvidia 镜像 #72

tiancheng91 opened this issue Jun 17, 2023 · 0 comments

Comments

@tiancheng91
Copy link
Owner

# Version: 2.0.0
FROM nvidia/cuda:11.7.0-cudnn8-runtime-ubuntu22.04

ENV DEBIAN_FRONTEND noninteractive
ENV TZ="Asia/Shanghai"
USER root
WORKDIR /PaddleOCR

# utils
RUN sed -i 's/archive.ubuntu.com/mirrors.cloud.aliyuncs.com/g' /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y python3-pip python-is-python3 wget aria2 git git-lfs vim && rm -rf /var/lib/apt/lists/* && apt-get clean
RUN apt-get update -y && apt-get install -y cuda-nvcc-11-7 libcudnn8=8.5.0.96-1+cuda11.7 libgl1 libglib2.0-0 
RUN apt-get update -y && apt-get install -y --allow-change-held-packages libcublas-11-7
RUN cd /usr/lib/x86_64-linux-gnu && ln -s libcudnn.so.8.5.0 libcudnn.so && ln -s /usr/local/cuda-11.7/lib64/libcublas.so.11 libcublas.so

RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
RUN python -m pip install paddlepaddle-gpu==2.4.2.post117 paddleocr paddlehub -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html && pip cache purge

RUN git clone -b release/2.6 https://github.com/PaddlePaddle/PaddleOCR.git /PaddleOCR
RUN pip install -r requirements.txt && pip cache purge

RUN mkdir -p /PaddleOCR/inference/ && cd /PaddleOCR/inference/ && \
    wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar && \
    wget https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar && \
    wget https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar && \
    tar -xf ch_PP-OCRv3_det_infer.tar && tar -xf ch_ppocr_mobile_v2.0_cls_infer.tar && tar -xf ch_PP-OCRv3_rec_infer.tar && rm -rf *.tar 

EXPOSE 8868

CMD ["/bin/bash","-c","hub install deploy/hubserving/ocr_system/ && hub serving start -m ocr_system --use_gpu -p 8868"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant