3.2. CLI를 사용하여 AWS에 인스턴스 배포


AWS 웹 콘솔 또는 CLI에서 새 RHEL AI AMI를 사용하여 AWS 인스턴스를 시작할 수 있습니다. 인스턴스를 시작할 배포 방법을 사용할 수 있습니다. 다음 절차에서는 CLI를 사용하여 사용자 지정 AMI로 AWS 인스턴스를 시작하는 방법을 보여줍니다.

CLI를 배포 옵션으로 사용하도록 선택하는 경우 "사전 요구 사항"에 표시된 대로 생성해야 하는 여러 구성이 있습니다.

사전 요구 사항

  • RHEL AI AMI를 생성하셨습니다. 자세한 내용은 "RHEL AI 이미지를 AWS AMI로 변환"을 참조하십시오.
  • AWS 명령줄 툴이 설치되어 있으며 aws_access_key_id 및 aws_secret_access_key로 올바르게 구성되어 있습니다.
  • VPC(Virtual Private Cloud)를 구성했습니다.
  • 인스턴스의 서브넷을 생성했습니다.
  • SSH 키 쌍을 생성했습니다.
  • AWS에 보안 그룹을 생성했습니다.

프로세스

  1. 다양한 매개변수의 경우 변수 ID를 수집해야 합니다.

    1. 이미지 ID에 액세스하려면 다음 명령을 실행합니다.

      $ aws ec2 describe-images --owners self
      Copy to Clipboard Toggle word wrap
    2. 보안 그룹 ID에 액세스하려면 다음 명령을 실행합니다.

      $ aws ec2 describe-security-groups
      Copy to Clipboard Toggle word wrap
    3. 서브넷 ID에 액세스하려면 다음 명령을 실행합니다.

      $ aws ec2 describe-subnets
      Copy to Clipboard Toggle word wrap
  2. 인스턴스를 생성할 때 환경 변수 채우기

    $ instance_name=rhel-ai-instance
    $ ami=<ami-id>
    $ instance_type=<instance-type-size>
    $ key_name=<key-pair-name>
    $ security_group=<sg-id>
    $ disk_size=<size-of-disk>
    Copy to Clipboard Toggle word wrap
  3. 다음 명령을 실행하여 변수를 사용하여 인스턴스를 생성합니다.

    $ aws ec2 run-instances \
        --image-id $ami \
        --instance-type $instance_type \
        --key-name $key_name \
        --security-group-ids $security_group \
        --subnet-id $subnet \
        --block-device-mappings DeviceName=/dev/sda1,Ebs='{VolumeSize='$disk_size'}' \
        --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value='$instance_name'}]'
    Copy to Clipboard Toggle word wrap

사용자 계정

RHEL AI AMI의 기본 사용자 계정은 cloud-user 입니다. sudo 를 통한 암호 없이 모든 권한을 갖습니다.

검증

  • Red Hat Enterprise Linux AI 툴이 올바르게 설치되었는지 확인하려면 ilab 명령을 실행해야 합니다.

    $ ilab
    Copy to Clipboard Toggle word wrap

    출력 예

    $ 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
    Copy to Clipboard Toggle word wrap

Updating Red Hat Enterprise Linux AI

최신 RHEL AI 버전으로 업데이트하려면 Red Hat Enterprise Linux AI 업데이트 설명서의 절차를 따르십시오.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat