简体   繁体   English

Heroku torchserve 应用程序崩溃,退出状态为 0

[英]Heroku torchserve app crashed, exited with status 0

I'm deploying torchserve on heroku free dyno.我正在 heroku 免费测功机上部署 torchserve。 Deploy works fine but the app isn't running properly.部署工作正常,但应用程序运行不正常。

LOG1:日志1:

2022-03-17T02:11:10.352655+00:00 heroku[web.1]: Starting process with command `torchserve --start --ncs --model-store model_store --models squeezenet1_1.mar`
2022-03-17T02:11:11.558957+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-03-17T02:11:11.701395+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
2022-03-17T02:11:11.896962+00:00 heroku[web.1]: Process exited with status 0
2022-03-17T02:11:12.059922+00:00 heroku[web.1]: State changed from starting to crashed

LOG2:日志2:

2022-03-17T05:17:29.472219+00:00 heroku[web.1]: Starting process with command `torchserve --start --ncs --model-store model_store --models squeezenet1_1.mar`
2022-03-17T05:17:30.854303+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2022-03-17T05:17:31.304897+00:00 heroku[web.1]: Process exited with status 0
2022-03-17T05:17:31.364160+00:00 heroku[web.1]: State changed from starting to crashed

Also, my requirements.txt:另外,我的requirements.txt:

-f https://download.pytorch.org/whl/cpu/torch_stable.html
future
psutil
requests
captum
packaging
numpy
cython
wheel
pillow==9.0.1
torch==1.10.0+cpu
torchvision==0.11.1+cpu
torchaudio==0.10.0+cpu
torchtext==0.11.0
torchserve==0.5.3

runtime.txt运行时.txt

python-3.8.12

system.properties系统属性

java.runtime.version=1.8.0_322

Problem was torchserve was running in background mode by default.问题是 torchserve 默认在后台模式下运行。 Adding --foreground to the torchserve command in Procfile fixed this.在 Procfile 的 torchserve 命令中添加 --foreground 解决了这个问题。 (Also, java runtime 11.0.14.1 is required by torchserve) (此外,java runtime 11.0.14.1 是 torchserve 所必需的)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM