-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (15 loc) · 670 Bytes
/
Dockerfile
File metadata and controls
21 lines (15 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.10.11-slim-buster
ENV DEBIAN_FRONTEND=noninteractive
# 设置工作目录
WORKDIR /app
# 安装vim,如果不需要临时修改容器文件,此步骤可以删
RUN apt-get update && \
apt-get install -y --no-install-recommends vim && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN set -eux; \
pip install --no-cache-dir rapidocr_api pillow rapidocr-onnxruntime==1.3.25 -i https://mirrors.aliyun.com/pypi/simple; \
pip uninstall -y opencv-python; \
pip install --no-cache-dir opencv-python-headless -i https://mirrors.aliyun.com/pypi/simple
EXPOSE 9003
CMD ["bash", "-c", "rapidocr_api -ip 0.0.0.0 -p 9003 -workers 2"]