diff --git a/README.md b/README.md index 85c5c6f..6ce7da8 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ PP-OCRv4模型: - cls: https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar ### 测试 -模型放在`/mnt/models/ocr/`下,运行下面的测试程序,可以识别出示例图片中的文字 +模型放在`/mnt/contest_ceph/zhanghao/models/ocr/`下,运行下面的测试程序,可以识别出示例图片中的文字 ```bash -python3 test.py +./run_in_docker.sh python3 test.py ``` ## OCR API Server 提供了一个`http` API server,可以通过服务的方式加载模型以及进行图片识别,启动命令如下: ```bash -python3 app.py -``` \ No newline at end of file +./run_in_docker.sh python3 app.py +``` diff --git a/run_in_docker.sh b/run_in_docker.sh new file mode 100755 index 0000000..db67364 --- /dev/null +++ b/run_in_docker.sh @@ -0,0 +1,7 @@ + +gpu=0 +command="python3 test.py" +if [[ $# -ge 1 ]]; then + command=$@ +fi +docker run -p 8080:80 -v `pwd`:/workspace -v /mnt/contest_ceph/zhanghao/models/ocr:/mnt/models/ocr -v /dev:/dev --device=/dev/iluvatar$gpu:/dev/iluvatar0 paddleocr:bi $command