Vertex AI SDK for Python을 사용하려는 경우 클라이언트를 초기화하는 서비스 계정에 Vertex AI 서비스 에이전트(roles/aiplatform.serviceAgent
) IAM 역할이 있는지 확인합니다.
Vertex AI를 사용하도록 Google Cloud 프로젝트를 설정합니다. 그런 다음 Cloud Storage 버킷을 만들고 AutoML 이미지 분류 모델을 학습시키는 데 사용할 이미지 파일을 복사합니다.
이 튜토리얼은 여러 페이지로 이루어져 있습니다.
프로젝트 및 환경 설정
각 페이지에서는 이 튜토리얼의 이전 페이지에서 안내를 이미 수행했다고 가정합니다.
시작하기 전에
Vertex AI 기능을 사용하려면 다음 단계를 완료합니다.
-
In the Google Cloud console, go to the project selector page.
-
Select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
- Cloud Shell을 엽니다. Cloud Shell은 웹브라우저에서 프로젝트와 리소스를 관리할 수 있는 Google Cloud 용 대화형 셸 환경입니다. Cloud Shell로 이동
- Cloud Shell에서 현재 프로젝트를 Google Cloud프로젝트 ID로 설정하고
projectid
셸 변수에 저장합니다. PROJECT_ID를 프로젝트 ID로 바꿉니다. 프로젝트 ID는 Google Cloud 콘솔에서 찾을 수 있습니다. 자세한 내용은 프로젝트 ID 찾기를 참조하세요.gcloud config set project PROJECT_ID && projectid=PROJECT_ID && echo $projectid
-
Enable the IAM, Compute Engine, Notebooks, Cloud Storage, and Vertex AI APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: roles/aiplatform.user, roles/storage.admin
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
IAM으로 이동 - 프로젝트를 선택합니다.
- 액세스 권한 부여를 클릭합니다.
-
새 주 구성원 필드에 사용자 식별자를 입력합니다. 일반적으로 Google 계정의 이메일 주소입니다.
- 역할 선택 목록에서 역할을 선택합니다.
- 역할을 추가로 부여하려면 다른 역할 추가를 클릭하고 각 역할을 추가합니다.
- 저장을 클릭합니다.
roles/aiplatform.user
) IAM 역할은 Vertex AI의 모든 리소스를 사용할 수 있는 액세스 권한을 제공합니다. Cloud Storage에서 문서의 학습 데이터 세트에 저장하는 Storage Admin(roles/storage.admin
) 역할입니다.다음 단계
이 튜토리얼의 다음 페이지에 따라Google Cloud 콘솔을 사용하여 이미지 분류 데이터 세트를 만들고 공개 Cloud Storage 버킷에서 호스팅되는 이미지 가져오기
-