我上传了一个模型
gcloud beta ai models upload --artifact-uri在码头我可以访问AIP_STORAGE_URI。我看到AIP_STORAGE_URI是Google的另一个位置,所以我尝试使用storage.Client()下载文件,但是它说我没有权限:
google.api_core.exceptions.Forbidden: 403 GET https://storage.googleapis.com/storage/v1/b/caip-tenant-***-***-*-*-***?projection=noAcl&prettyPrint=false: custom-online-prediction@**.iam.gserviceaccount.com does not have storage.buckets.get access to the Google Cloud Storage bucket我使用默认服务帐户运行此端点。
https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#artifacts
根据上面的链接:The service account that your container uses by default has permission to read from this URI.
我做错了什么?
发布于 2021-07-30 17:29:41
错误背后的原因是,顶点AI使用的默认服务帐户具有“存储对象查看器”角色,它排除了storage.buckets.get权限。同时,代码的storage.Client()部分向顶点AI托管桶发出storage.buckets.get请求,默认服务帐户对此没有权限。
为了解决这个问题,我建议你遵循以下步骤-
https://stackoverflow.com/questions/68465990
复制相似问题