我正在开发 Cloud Run,它似乎还处于测试阶段,无法重新部署,如下所示。如果我从 GCP 控制台删除该服务,然后将相同的 Docker 部署为新服务,它就会起作用。我找不到设置 revisionTemplate 的方法。
我运行此命令以使用 gcloud 部署 Cloud Run 服务。
gcloud beta run deploy v2-cms --image gcr.io/my-project/v2-cms --quiet
那么,这样说就失败了。
X Deploying...
. Creating Revision...
. Routing traffic...
Deployment failed
ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'revisionTemplate'
If you would like to report this issue, please run the following command:
gcloud feedback
To check gcloud for common problems, please run the following command:
gcloud info --run-diagnostics
要解决此问题,请使用
gcloud
更新
gcloud components update
至最新版本
将 gcloud 升级到 434.0.0 版本后,我在 FreeBSD 13.2 上遇到了同样的问题:
ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'clean_version'
我将其修复在
/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/transport.py
,第628行:
os=user_platform.operating_system,
# os_version=user_platform.operating_system.clean_version,
os_version='13.2',
architecture=architecture,
确保 GCloud 仍支持您本地的 Tensorflow 版本https://cloud.google.com/ai-platform/training/docs/runtime-version-list
我最近遇到了这个问题,问题是我的 Python 版本(3.11)太新了。我不得不切换回 3.9。