Skip to content

📄 Awesome OCR multiple programing languages toolkits based on ONNX Runtime, OpenVINO, MNN, PaddlePaddle, TensorRT and PyTorch.

fix(rapidocr_api): 补充依赖,指定版本号 (#305)

weijh9824aef21501
diff --git a/api/Dockerfile b/api/Dockerfile
index 34b7cd8..b033ed0 100644
--- a/api/Dockerfile
+++ b/api/Dockerfile
@@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
RUN set -eux; \
- pip install --no-cache-dir rapidocr_api -i https://mirrors.aliyun.com/pypi/simple; \
+ 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
diff --git a/api/README.md b/api/README.md
index 3d153be..45800ae 100644
--- a/api/README.md
+++ b/api/README.md
@@ -1 +1,21 @@
### See [Documentation](https://rapidai.github.io/RapidOCRDocs/install_usage/rapidocr_api/usage/)
+
+build时使用宿主的网络
+```
+ docker build -t rapidocr_api:0.1.4 --network host .
+```
+
+使用宿主上的代理
+```
+ docker build -t rapidocr_api:0.1.4 --network host --build-arg HTTP_PROXY=http://127.0.0.1:8888 --build-arg HTTPS_PROXY=http://127.0.0.1:8888 .
+```
+
+调试运行:
+```
+docker run --rm -p 9003:9003 --name rapidocr_api rapidocr_api:0.1.4
+```
+
+运行:
+```
+docker run -d -p 9003:9003 --name rapidocr_api rapidocr_api:0.1.4
+```