fc icon indicating copy to clipboard operation
fc copied to clipboard

本地调试 ca 容器启动参数与线上环境不一致

Open SquatsTonight opened this issue 4 years ago • 1 comments

保持本地调试环境与线上一致,基于 torchserve 发现了一处不一致的地方,首先看配置:

customContainerConfig:
    image: registry.cn-hangzhou.aliyuncs.com/yhr-work/torchserve
command: '["torchserve"]'
args: '["--start","--ncs","--model-store","model-store","--models","densenet161.mar"]'

上述配置在本地调试能跑通,但是线上会出现 ca 启动超时问题,而将配置改为如下后,线上线下运行都没问题:

customContainerConfig:
    image: registry.cn-hangzhou.aliyuncs.com/yhr-work/torchserve
command: '["/usr/local/bin/dockerd-entrypoint.sh"]'
args: '["torchserve", "--start", "--ncs", "--model-store", "model-store", "--models", "densenet161.mar"]'

搜索后发现 torchserve 这个指令默认是运行在 backgroud 的,因此在容器启动后,会立刻结束,这也是线上 ca 容器出现超时问题,详情可以参考这里。 而本地调试时,即便启动指令默认是运行在后台的,ca 容器也能成功启动并且一直保持运行,这就是线下和线上不一致的地方,目前原因未知,得将本地调试时容器启动的参数与线上保持一致。

SquatsTonight avatar Aug 19 '21 07:08 SquatsTonight

Ref https://github.com/devsapp/fc/issues/792

wss-git avatar Nov 04 '22 09:11 wss-git