【发布时间】:2019-08-29 05:11:04
【问题描述】:
我创建了一个模型并将其部署到 Cloud AI Platform Predictions (ML Engine)。
如何使 REST 端点可公开访问?目前,它仅在我的项目中可见。
【问题讨论】:
标签: google-cloud-ml
我创建了一个模型并将其部署到 Cloud AI Platform Predictions (ML Engine)。
如何使 REST 端点可公开访问?目前,它仅在我的项目中可见。
【问题讨论】:
标签: google-cloud-ml
首先创建一个policy.yaml,内容如下:
bindings:
- members:
- group:allAuthenticatedUsers
role: roles/ml.modelUser
然后,设置模型的 IAM 策略:
gcloud ai-platform models set-iam-policy my_model --project=my_project policy.yaml
您可以使用相同的方法来限制来自特定域的特定 Google 用户组
bindings:
- members:
- group:admins@example.com
- domain:example.com
role: roles/ml.modelUser
- members:
- user:sean@example.com
role: roles/ml.modelUser
【讨论】: