Skip to content

部署Flask 服务后,版面分析/glmocr/parse接口如何支持并发? #219

Description

@java-my-life

System Info / 系統信息

系统为Linux
两张A100显卡。

Reproduction / 复现过程

参考官方给出的Flask示例,改为WSGI服务启动后发现不支持并发。
wsgi.py

from glmocr.config import load_config
from glmocr.server import create_app

config = load_config("config.yaml")
app = create_app(config)

app.config["pipeline"].start()

通过命令启动:
gunicorn -w 2 --threads 8 -b 0.0.0.0:5002 wsgi:app

同时调用接口http://localhost:5002/glmocr/parse 解析多张图片时,发现并不支持并发处理。
请问要如何调整?

Expected behavior / 期待表现

如何部署才能支持并发处理?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions