이 페이지에서는 Google Distributed Cloud (GDC) 오프라인 어플라이언스가 Vertex AI API에 제공하는 다양한 유형의 클라이언트 라이브러리를 설명하고 tar 파일에서 이를 설치하는 방법을 설명합니다.
GDC 에어 갭 어플라이언스는 광학 문자 인식 (OCR), Vertex AI Translation, Speech-to-Text 등 다양한 Vertex AI 서비스를 제공합니다. 각 서비스는 자체 API를 제공하며, 클라이언트 라이브러리를 사용하여 설치할 수 있습니다.
클라이언트 라이브러리를 사용하면 GDC 에어갭 어플라이언스에서 지원되는 언어로 Vertex AI API에 쉽게 액세스할 수 있습니다. 원시 서버 요청을 수행하여 Vertex AI API를 직접 사용할 수 있지만 클라이언트 라이브러리는 필요한 코드를 줄여 주는 간소화 기능을 제공합니다.
클라이언트 라이브러리는 Vertex AI API에 프로그래매틱 방식으로 액세스하기 위한 권장 방법입니다. tar 파일에서 직접 라이브러리 파일을 추출하여 Vertex AI 클라이언트 라이브러리를 설치합니다.
Vertex AI 클라이언트 라이브러리
Vertex AI는 CentOS 및 Ubuntu 운영체제용 클라이언트 라이브러리의 여러 버전을 제공합니다.
tar 파일의 Vertex AI 클라이언트 라이브러리 명명 규칙은 운영체제, 서비스 이름, 버전을 기반으로 합니다. 파일 이름은 다음 형식을 따릅니다.
OS-google-cloud-SERVICE-VERSION.tar.gz
다음을 바꿉니다.
OS: 클라이언트 라이브러리를 설치할 운영체제의 이름입니다. 허용되는 값은 centos 및 ubuntu, 입니다.
SERVICE: 클라이언트 라이브러리를 다운로드할 Vertex AI 서비스의 이름입니다. 허용되는 값은 다음과 같습니다.
aiplatform: Vertex AI Platform 클라이언트 라이브러리입니다.
speech: Speech-to-Text 클라이언트 라이브러리입니다.
translate: Vertex AI Translation 클라이언트 라이브러리입니다.
vision: OCR 클라이언트 라이브러리입니다.
VERSION: 클라이언트 라이브러리의 버전 번호입니다(예: 3.8.0).
다음 표에는 GDC 에어 갭 어플라이언스에서 지원하는 Vertex AI 클라이언트 라이브러리가 나와 있습니다.
[[["이해하기 쉬움","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,["# Install Vertex AI client libraries\n\nThis page describes the various types of client libraries that\nGoogle Distributed Cloud (GDC) air-gapped appliance offers for Vertex AI APIs and\nexplains how to install them from the tar file.\n\nGDC air-gapped appliance offers various Vertex AI\nservices, including Optical Character Recognition (OCR), Vertex AI Translation, and\nSpeech-to-Text. Each service provides its own API, which you can install using\nclient libraries.\n\nClient libraries simplify accessing Vertex AI APIs from supported\nlanguages on GDC air-gapped appliance. Although you can use\nVertex AI APIs directly by making raw server requests, client\nlibraries provide simplifications that reduce the required code.\n\nClient libraries are the recommended method for accessing\nVertex AI APIs programmatically. Install a\nVertex AI client library by extracting the library file directly\nfrom the tar file.\n\nVertex AI client libraries\n--------------------------\n\nVertex AI offers different versions of client libraries for\nCentOS and Ubuntu operating systems.\n\nThe naming conventions of Vertex AI client libraries in the tar\nfile are based on the operating system, the service name, and the version. The\nfilenames adhere to the following format: \n\n \u003cvar translate=\"no\"\u003eOS\u003c/var\u003e-google-cloud-\u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e-\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e.tar.gz\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eOS\u003c/var\u003e: the name of the operating system where you want to install the client library. Allowed values are `centos` and `ubuntu`.\n- \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e: the name of the Vertex AI\n service from which you want to download the client library. The following are\n the allowed values:\n\n - `aiplatform`: the Vertex AI Platform client library.\n - `speech`: the Speech-to-Text client library.\n - `translate`: the Vertex AI Translation client library.\n - `vision`: the OCR client library.\n- \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e: the version number of the client library,\n such as `3.8.0`.\n\nThe following table contains the Vertex AI client libraries that\nGDC air-gapped appliance supports:\n\nBefore you begin\n----------------\n\nBefore downloading the tar file and extracting client libraries, follow these\nsteps:\n\n1. [Set up a project for Vertex AI](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vertex-ai-set-up-project).\n\n2. Authenticate with gdcloud CLI:\n\n gdcloud auth login\n\n For more information about how to authenticate with your configured identity\n provider, see [the gdcloud CLI authentication](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-auth).\n3. Assign the Cloud AI Viewer (`cloud-ai-viewer`) role to [a service account](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vertex-ai-set-up-project#set-up-service).\n The service account requires this role to access the Vertex AI\n services.\n\n4. Verify that you have installed Python version 3.7.\n\nInstall a client library\n------------------------\n\nAfter completing the [prerequisites](#before-you-begin), follow these steps to\ndownload the tar file, and use the tar file to install a client library:\n\n1. Download the client library you want to install:\n\n wget https://\u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e/.well-known/static/client-libraries/\u003cvar translate=\"no\"\u003eCLIENT_LIBRARY\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eGDC_URL\u003c/var\u003e: the URL of your organization in GDC.\n - \u003cvar translate=\"no\"\u003eCLIENT_LIBRARY\u003c/var\u003e: the filename of the [client library](#clientlib) you want to download.\n2. Extract the library file:\n\n tar -zxf \u003cvar translate=\"no\"\u003eCLIENT_LIBRARY\u003c/var\u003e\n\n3. Install the client library in GDC air-gapped appliance:\n\n pip install -r \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eFOLDER_NAME\u003c/span\u003e\u003c/var\u003e/requirements.txt --no-index --find-links \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eFOLDER_NAME\u003c/span\u003e\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eFOLDER_NAME\u003c/var\u003e with the path to the local\n directory where you downloaded the library file.\n4. Import the client library using a Python script. The following example shows\n a code snippet of a Python script that imports the Vertex AI Translation\n client library to illustrate what importing libraries looks like:\n\n from google.cloud import https://cloud.google.com/python/docs/reference/translate/latest/google.cloud.translate_v2.client.Client.html\n translate_client = https://cloud.google.com/python/docs/reference/translate/latest/google.cloud.translate_v2.client.Client.html.https://cloud.google.com/python/docs/reference/translate/latest/google.cloud.translate_v2.client.Client.html(\n client_options={\"\u003cvar translate=\"no\"\u003eAPI_ENDPOINT\u003c/var\u003e\": \"https://foo-translation.googleapis.com\"})\n result\n = translate_client.https://cloud.google.com/python/docs/reference/translate/latest/google.cloud.translate_v2.client.Client.html(text, target_language=\"ru\")\n\n [...]\n\n This code sample is not complete. To make a Vertex AI Translation\n request, [learn about translation features](/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vertex-ai-translation).\n5. Save the Python script with a name, such as `translation-service.py`.\n\n6. Run the Python script:\n\n python \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eSCRIPT_NAME\u003c/span\u003e\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eSCRIPT_NAME\u003c/var\u003e with the name you gave to your\n Python script, such as `translation-service.py`."]]