File size: 771 Bytes
d7df7ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.9.10-slim

RUN apt-get update -y && apt-get upgrade -y && apt-get install -y pkg-config build-essential libudev-dev libssl-dev
RUN apt install -y wget bzip2 ca-certificates nginx supervisor libglib2.0-0 libxext6 libsm6 libxrender1 libgl1-mesa-glx libzbar0 build-essential libpcre3 git mercurial subversion locales procps

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

RUN useradd -m -u 1000 user
USER user

ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

COPY --chown=user . $HOME/app

RUN pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

RUN git clone https://github.com/PaddlePaddle/PaddleOCR

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