이 튜토리얼에서는 전반적으로 Google Cloud 콘솔 및 Cloud Shell을 사용하여 Google Cloud와 상호작용합니다. Cloud Shell 대신 Google Cloud CLI가 설치된 다른 Bash 셸을 사용할 수도 있습니다.
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
At the bottom of the Google Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
Cloud Shell이 프롬프트에 (PROJECT_ID)$를 표시하지 않는 경우 (여기서 PROJECT_ID는 Google Cloud 프로젝트 ID로 바꿈) 다음 명령어를 실행하여 프로젝트를 사용할 Cloud Shell을 구성하세요.
gcloudconfigsetprojectPROJECT_ID
Cloud Storage 버킷 만들기
이 튜토리얼의 나머지 섹션에서 사용할 리전 Cloud Storage 버킷을 us-central1 리전에 만듭니다. 튜토리얼을 따라가는 동안 여러 가지 용도로 버킷을 사용하게 될 것입니다.
Vertex AI의 커스텀 학습 작업에서 사용할 학습 코드 저장
커스텀 학습 작업에서 출력하는 모델 아티팩트 저장
Vertex AI 엔드포인트에서 예측을 가져오는 웹 앱 호스팅
Cloud Storage 버킷을 만들려면 Cloud Shell 세션에서 다음 명령어를 실행합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Hello custom training: Set up your project and environment\n\nThis page walks through setting up your Google Cloud project to use\nVertex AI and downloading some TensorFlow code for training. You will\nalso download code for a web app that gets predictions.\nThis tutorial has several pages:\n\n\u003cbr /\u003e\n\n1. Setting up your project and environment.\n\n2. [Training a custom image classification\n model.](/vertex-ai/docs/tutorials/image-classification-custom/training)\n\n3. [Serving predictions from a custom image classification\n model.](/vertex-ai/docs/tutorials/image-classification-custom/serving)\n\n4. [Cleaning up your project.](/vertex-ai/docs/tutorials/image-classification-custom/cleanup)\n\nEach page assumes that you have already performed the instructions from the\nprevious pages of the tutorial.\n\nBefore you begin\n----------------\n\nThroughout this tutorial, use Google Cloud console and\n[Cloud Shell](/shell/docs) to interact with Google Cloud. Alternatively,\ninstead of Cloud Shell, you\ncan use another Bash shell with the [Google Cloud CLI](/sdk/docs) installed.\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI and Cloud Run functions APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com,cloudfunctions)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Vertex AI and Cloud Run functions APIs.\n\n\n [Enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=aiplatform.googleapis.com,cloudfunctions)\n\n1. In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\n At the bottom of the Google Cloud console, a\n [Cloud Shell](/shell/docs/how-cloud-shell-works)\n session starts and displays a command-line prompt. Cloud Shell is a shell environment\n with the Google Cloud CLI\n already installed and with values already set for\n your current project. It can take a few seconds for the session to initialize.\n2. If Cloud Shell does not display\n `(`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`)$`\n in its prompt (where \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is replaced by your\n Google Cloud project ID), then run the following command to\n configure Cloud Shell to use your project:\n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\nCreate a Cloud Storage bucket\n-----------------------------\n\nCreate a regional [Cloud Storage](/storage/docs) bucket in the `us-central1`\nregion to use for the rest of this tutorial. As you follow the tutorial, use the\nbucket for several purposes:\n\n- Store training code for Vertex AI to use in a custom training job.\n- Store the model artifacts that your custom training job outputs.\n- Host the web app that gets predictions from your Vertex AI endpoint.\n\nTo create the Cloud Storage bucket, run the following command in your\nCloud Shell session: \n\n gcloud storage buckets create gs://\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e --location=us-central1\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The ID of your Google Cloud project.\n- \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: A name that you choose for your bucket. For example, `hello_custom_`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e. Learn about [requirements for bucket\n names](/storage/docs/buckets#naming).\n\nDownload sample code\n--------------------\n\nDownload sample code to use for the rest of the tutorial. \n\n gcloud storage cp gs://cloud-samples-data/ai-platform/hello-custom/hello-custom-sample-v1.tar.gz - | tar -xzv\n\nTo optionally view the sample code files, run the following command: \n\n ls -lpR hello-custom-sample\n\nThe `hello-custom-sample` directory has four items:\n\n- `trainer/`: A directory of TensorFlow Keras code for training the flower\n classification model.\n\n- `setup.py`: A configuration file for packaging the `trainer/` directory into\n a Python source distribution that Vertex AI can use.\n\n- `function/`: A directory of Python code for a\n [Cloud Run function](/functions/docs) that can receive and preprocess\n prediction requests from a web browser, send them to Vertex AI,\n process the prediction responses, and send them back to the browser.\n\n- `webapp/`: A directory with code and markup for a web app that gets flower\n classification predictions from Vertex AI.\n\nWhat's next\n-----------\n\nFollow the [next page of this tutorial](/vertex-ai/docs/tutorials/image-classification-custom/training) to run a custom\ntraining job on Vertex AI."]]