5.2. CLI를 사용하여 Google Cloud Platform에 인스턴스 배포
Google Cloud Platform 웹 콘솔 또는 CLI에서 새 RHEL AI Google Cloud Platform 이미지로 인스턴스를 시작할 수 있습니다. 인스턴스를 시작할 배포 방법을 사용할 수 있습니다. 다음 절차에서는 CLI를 사용하여 사용자 정의 Google Cloud Platform 이미지로 Google Cloud Platform 인스턴스를 시작하는 방법을 보여줍니다.
CLI를 배포 옵션으로 사용하도록 선택하는 경우 "사전 요구 사항"에 표시된 대로 생성해야 하는 여러 구성이 있습니다.
사전 요구 사항
- RHEL AI Google Cloud Platform 이미지를 생성하셨습니다. 자세한 내용은 "RHEL AI 이미지를 Google Cloud Platform 이미지로 변환"을 참조하십시오.
- 특정 머신에 Google Cloud Platform CLI를 설치한 경우 Linux에 Google Cloud Platform CLI 설치를 참조하십시오.
프로세스
다음 명령을 실행하여 Google Cloud Platform 계정에 로그인합니다.
$ gcloud auth login- CLI에서 Google Cloud Platform 인스턴스를 시작하기 전에 인스턴스에 대한 여러 구성 변수를 생성해야 합니다.
배포에 사용할 인스턴스 프로필을 선택해야 합니다. 다음 명령을 실행하여 원하는 리전의 모든 프로필을 나열합니다.
$ gcloud compute machine-types list --zones=<zone>인스턴스 배포에 필요한 기본 시스템 유형을 기록해 두십시오.
이제 Google Cloud Platform 인스턴스 생성을 시작할 수 있습니다. 인스턴스를 생성할 때 에 대한 환경 변수를 채웁니다.
name=my-rhelai-instance zone=us-central1-a machine_type=a3-highgpu-8g accelerator="type=nvidia-h100-80gb,count=8" image=my-custom-rhelai-image disk_size=1024 subnet=default사용할 영역을 구성합니다.
$ gcloud config set compute/zone $zone이제 다음 명령을 실행하여 인스턴스를 시작할 수 있습니다.
$ gcloud compute instances create \ ${name} \ --machine-type ${machine_type} \ --image $image \ --zone $zone \ --subnet $subnet \ --boot-disk-size ${disk_size} \ --boot-disk-device-name ${name} \ --accelerator=$accelerator
검증
Red Hat Enterprise Linux AI 툴이 올바르게 설치되었는지 확인하려면
ilab명령을 실행합니다.$ ilab출력 예
$ ilab Usage: ilab [OPTIONS] COMMAND [ARGS]... CLI for interacting with InstructLab. If this is your first time running ilab, it's best to start with `ilab config init` to create the environment. Options: --config PATH Path to a configuration file. [default: /home/<user>/.config/instructlab/config.yaml] -v, --verbose Enable debug logging (repeat for even more verbosity) --version Show the version and exit. --help Show this message and exit. Commands: config Command Group for Interacting with the Config of InstructLab. data Command Group for Interacting with the Data generated by... model Command Group for Interacting with the Models in InstructLab. system Command group for all system-related command calls taxonomy Command Group for Interacting with the Taxonomy of InstructLab. Aliases: chat model chat generate data generate serve model serve train model train
Updating Red Hat Enterprise Linux AI
최신 RHEL AI 버전으로 업데이트하려면 Red Hat Enterprise Linux AI 업데이트 설명서의 절차를 따르십시오.