5

我的图像是 11.4 GB。我正在尝试以下命令:

gcloud beta ai-platform versions create v1 \
  --region=$REGION \
  --model=$MODEL \
  --machine-type=n1-highmem-2 \
  --image=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO_NAME/$IMAGE_NAME \
  --ports=8000 

它失败了:

Error: model server never became ready. Please validate that your model file or container configuration are valid, Error details: model server never became ready: status: "False" last_transition_time { seconds: 1603932493 } reason: "ContainersNotReady" message: "containers with unready status: [online-prediction-be-test85b70d-v1fb1b0606]" type: "ContainersReady"

即使我可以使用docker run. 我需要改变什么?

当我在未指定区域且详细程度设置为 DEBUG 的情况下运行时,我得到:

RecursionError: maximum recursion depth exceeded while calling a Python object
ERROR: gcloud crashed (RecursionError): maximum recursion depth exceeded while calling a Python object

The Python stack trace is massive (last couple of lines):
  File "/googlecloudsdk/core/log.py", line 484, in ShowStructuredOutput
    show_messages = properties.VALUES.core.show_structured_logs.Get()
  File "/googlecloudsdk/core/properties.py", line 2380, in Get
    value = _GetProperty(self, named_configs.ActivePropertiesFile.Load(),
  File "/googlecloudsdk/core/properties.py", line 2679, in _GetProperty
    value = _GetPropertyWithoutDefault(prop, properties_file)
  File "/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 2711, in _GetPropertyWithoutDefault
    value = _GetPropertyWithoutCallback(prop, properties_file)
  File "/google-cloud-sdk/lib/googlecloudsdk/core/properties.py", line 2741, in _GetPropertyWithoutCallback
    for value_flags in reversed(invocation_stack):

4

2 回答 2

0

无法从您收到的此错误消息中理解任何内容,但是,我猜 gcloud 无法对您的容器运行健康检查,您可以指定它:--health-route然后看看?

于 2021-02-17T17:39:46.413 回答
0

请在您的 http 网络服务器中指定健康路线并包括--container-health-route=/healthz上传时模型。例如,如果您使用 Flask Web 服务器,请确保在您的 Flask 应用程序中添加以下内容。

@app.route('/healthz')
def healthz():
    return "OK"

Vertex AI 或 google ai 平台要求您在 http 网络服务器中指定健康检查例程。请参阅内容以详细了解要求。

于 2021-09-27T07:23:07.360 回答