HUSTAI / uie_pytorch

PaddleNLP UIE模型的PyTorch版实现
Apache License 2.0
539 stars 93 forks source link

docker部署出错 无法推理结果 #32

Closed ranxi2001 closed 10 months ago

ranxi2001 commented 10 months ago

系统:kylin v10 armV8 aarch64 镜像:FROM kumatea/pytorch

python3 /app/uie_pytorch/uie-backend-api.py

[2023-09-10 14:42:23,681] [ INFO] - >>> [PyTorchInferBackend] Creating Engine ... [2023-09-10 14:42:39,516] [ INFO] - >>> [PyTorchInferBackend] Use CPU to inference ... [2023-09-10 14:42:39,518] [ INFO] - >>> [PyTorchInferBackend] Engine Created ... /usr/local/lib/python3.9/site-packages/transformers/modeling_utils.py:909: FutureWarning: The device argument is deprecated and will be removed in v5 of Transformers. warnings.warn(

调用无结果 502bad POST http://127.0.0.1:888/ Error: socket hang up Request Headers Content-Type: application/json User-Agent: PostmanRuntime/7.32.3 Accept: / Postman-Token: 3f204252-7d5a-4732-8268-c60829276d57 Host: 127.0.0.1:888 Accept-Encoding: gzip, deflate, br Connection: keep-alive

ranxi2001 commented 10 months ago

本地x64架构可以本地运行: [2023-09-10 22:05:06,773] [ INFO] - >>> [PyTorchInferBackend] Creating Engine ... [2023-09-10 22:05:07,963] [ INFO] - >>> [PyTorchInferBackend] Use CPU to inference ... [2023-09-10 22:05:07,964] [ INFO] - >>> [PyTorchInferBackend] Engine Created ... WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.

ranxi2001 commented 10 months ago

解决方案:使用静态图模型引擎onnx。 静态图