mirror of
https://github.com/sml2h3/ocr_api_server.git
synced 2025-05-03 04:39:53 +08:00
修改镜像启动方式为CMD,以支持直接docker run时更改启动参数
This commit is contained in:
parent
15b2d91cbf
commit
942b868592
@ -14,4 +14,4 @@ RUN cd /app \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["sh", "entrypoint.sh"]
|
||||
CMD ["python3", "ocr_server.py", "--port", "9898", "--ocr", "--det"]
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
python3 ocr_server.py --port 9898 --ocr --det
|
@ -17,6 +17,8 @@ print(' ')
|
||||
# 目标检测就把ocr改成det,其他相同
|
||||
# 方式一
|
||||
file = open(r'test.jpg', 'rb').read()
|
||||
# file = open(r'test_calc.png', 'rb').read()
|
||||
|
||||
|
||||
api_url = f"{host}/ocr/file"
|
||||
resp = requests.post(api_url, files={'image': file})
|
||||
|
BIN
test_calc.png
Normal file
BIN
test_calc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user