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

社会演员多 pytorch 421

原文标题Heroku torchserve app crashed, exited with status 0

我在 heroku free dyno 上部署了 torchserve。部署工作正常,但应用程序运行不正常。

日志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

日志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

另外,我的 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

python-3.8.12

system.properties

java.runtime.version=1.8.0_322

原文链接:https://stackoverflow.com//questions/71508938/heroku-torchserve-app-crashed-exited-with-status-0

回复

我来回复
  • Dionisis G的头像
    Dionisis G 评论

    问题是 torchserve 默认在后台模式下运行。将 –foreground 添​​加到 Procfile 中的 torchserve 命令修复了这个问题。(此外,torchserve 需要 java 运行时 11.0.14.1)

    2年前 0条评论