Spaces:
Runtime error
Runtime error
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"] |