Docker github.com/tleyden/open-ocr识别

github.com/tleyden/open-ocr

Docker github.com/tleyden/open-ocr识别_第1张图片
image.png

1.安装docker

2.安装docker-compose
https://github.com/docker/compose/releases

`curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose`

chmod +x /usr/local/bin/docker-compose
docker-compose --version

3.用git拉取代码
git clone https://github.com/tleyden/open-ocr

4.进到 open-ocr/docker-compose

cd open-ocr/docker-compose

5.设置环境变量,你的ip和你要用的ocr版本

>export OPEN_OCR_INSTANCE=open-ocr-2
>export RABBITMQ_HOST=192.168.20.187

6.跑起来

docker-compose up 

7.测试

>curl -X POST -H "Content-Type: application/json" -d '{"img_url":"https://b-ssl.duitang.com/uploads/item/201904/19/20190419200423_CZ3PN.thumb.760_380_c.jpeg","engine":"tesseract","engine_args":{"lang":"chi_sim"}}' http://192.168.20.187:9292/ocr

你可能感兴趣的:(Docker github.com/tleyden/open-ocr识别)