File size: 500 Bytes
71a9e68
 
 
 
254fb1c
ae9abb2
254fb1c
 
71a9e68
730be64
3366430
2db0c5f
 
 
 
 
 
71a9e68
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10

ARG PIP_NO_CACHE_DIR=1

RUN apt-get update \
    && apt-get install -y tesseract-ocr libgl1 \
    && rm -rf /var/lib/apt/lists/*

RUN pip install torch==2.1.1 -i https://download.pytorch.org/whl/cpu
RUN pip install paddlepaddle==2.6.0 -i https://mirror.baidu.com/pypi/simple
RUN pip install transformers pytesseract gradio Pillow paddleocr==2.7.0.3

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
WORKDIR $HOME/app
COPY --chown=user . $HOME/app

CMD ["python", "app.py"]