Spaces:
Running
Running
FROM python:3.10 | |
# FROM python:3.10-slim-bullseye | |
ENV CUDA_VISIBLE_DEVICES=-1 | |
ARG PIP_NO_CACHE_DIR=1 | |
# libssl1.1 for PaddlePaddle | |
RUN wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb \ | |
&& dpkg -i libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb \ | |
&& rm libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb | |
RUN pip install torch==2.1.1 -i https://download.pytorch.org/whl/cpu | |
RUN pip install paddlepaddle==2.5.1 -i https://mirror.baidu.com/pypi/simple | |
RUN pip install transformers gradio Pillow | |
RUN pip install paddleocr==2.7.0.3 \ | |
&& pip uninstall -y opencv-python opencv-contrib-python \ | |
&& pip install opencv-python-headless | |
RUN mkdir /app | |
COPY app.py /app | |
COPY example_imgs/ /app/example_imgs/ | |
WORKDIR /app | |
CMD ["python", "-u", "app.py"] |