img studio
ImgStudio for Imagen 3
Vertex AI
> Enable all recommended APIs
europe-west9
)YOUR_COMPANY-imgstudio-output
YOUR_COMPANY-imgstudio-library
YOUR_COMPANY-imgstudio-export-config
export-fields-options.json
是一个特定于您的使用情况的配置文件,您可以在存储库中找到该示例,其目的是设置您想要为生成的内容设置的所需元数据“contextAuthorTeam”
)及其标签(例如: “In which team are you?”
) 、其名称(例如: “Associated team(s)”
)、其标签isMandatory (例如: true
)以及最后的选项2 设置Cloud Build触发器
YOUR_COMPANY-imgstudio
Manual invocation
Watch
> Custom
> Releases
>“应用”Cloud Build configuration file (yaml or json)
/cloudbuild.yaml
_NEXT_PUBLIC_EXPORT_FIELDS_OPTIONS_URI
gs://YOUR_COMPANY-imgstudio-export-config/export-fields-options.json
_NEXT_PUBLIC_GCS_BUCKET_LOCATION
europe-west9
_NEXT_PUBLIC_VERTEX_API_LOCATION
europe-west9
_NEXT_PUBLIC_GEMINI_MODEL
= gemini-1.5-flash-001
_NEXT_PUBLIC_OUTPUT_BUCKET
YOUR_COMPANY-imgstudio-output
_NEXT_PUBLIC_TEAM_BUCKET
YOUR_COMPANY-imgstudio-library
_NEXT_PUBLIC_PRINCIPAL_TO_USER_FILTERS
admin-,@company.com
以便可以提取用户 ID jdupont_NEXT_PUBLIC_EDIT_ENABLED
(新!)false
”_NEXT_PUBLIC_EDIT_MODEL
(新!)_NEXT_PUBLIC_SEG_MODEL
(新!)[email protected]
Artifact Registry Writer
和Logs Writer
Internal
如果您希望将 IAP 用户限制在您的GCP 组织域中)External
如果您的某些用户位于与您的 GCP 组织不同的网域)YOUR_COMPANY-imgstudio
YOUR_COMPANY_DOMAIN
YOUR_COMPANY-imgstudio-sa
Cloud Datastore User
Logs Writer
Secret Manager Secret Accessor
Service Account Token Creator
Storage Object Creator
Storage Object Viewer
Vertex AI User
Deploy one revision from an existing container image
latest
镜像YOUR_COMPANY-imgstudio-app
europe-west9
)Internal
> Allow traffic from external Application Load Balancers
3000
YOUR_COMPANY-imgstudio-sa
gcloud beta services identity create --service=iap.googleapis.com --project=PROJECT_ID
[email protected]
Cloud Run Invoker
角色授予之前创建/获取的IAP 服务帐号imgstudio
imgstudio.YOUR_COMPANY_DOMAIN
Off
Off
dig imgstudio.YOUR_COMPANY_DOMAIN NS +short
Application Load Balancer (HTTP/HTTPS)
Public Facing (external)
Global
Global external Application Load Balancer
YOUR_COMPANY-imgstudio-lb
HTTPS
Ephemeral
(您也可以配置静态 IP)YOUR_COMPANY-imgstudio-cert
imgstudio.YOUR_COMPANY_DOMAIN
YOUR_COMPANY-imgstudio-back
Serverless Network Endpoint Group
> 完成YOUR_COMPANY-imgstudio-neg
europe-west9
)YOUR_COMPANY-imgstudio-app
> 创建Off
YOUR_COMPANY-imgstudio-lb
imgstudio
imgstudio.YOUR_COMPANY_DOMAIN
YOUR_COMPANY-imgstudio-back
IAP-secured Web App User
,> 保存Native mode
,> 继续(default)
(保持这种方式非常重要)Region
europe-west9
)Production rules
metadata
combinedFilters
,索引选项 1: Array contains
timestamp
,索引选项 2: Descending
__name__
,索引选项 3: Descending
Collection
https://console.firebase.google.com/project/PROJECT_ID/firestore/databases/-default-/rules
YOUR_COMPANY
& PROJECT_ID
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, get, list, create, update: if get(/databases/$(database)/documents/request.auth.uid).data.serviceAccount == 'YOUR_COMPANY-imgstudio-sa@PROJECT_ID.iam.gserviceaccount.com';
allow delete: if false;
}}}