5.2. CLI を使用した Google Cloud Platform へのインスタンスのデプロイ


Google Cloud Platform Web コンソールまたは 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 をインストールする を参照してください。

手順

  1. 次のコマンドを実行して、Google Cloud Platform アカウントにログインします。

    $ gcloud auth login
    Copy to Clipboard Toggle word wrap
  2. CLI で Google Cloud Platform インスタンスを起動する前に、インスタンス用にいくつかの設定変数を作成する必要があります。
  3. デプロイメントに使用するインスタンスプロファイルを選択する必要があります。次のコマンドを実行して、目的のリージョン内のすべてのプロファイルをリスト表示します。

    $ gcloud compute machine-types list --zones=<zone>
    Copy to Clipboard Toggle word wrap

    希望するマシンタイプをメモしてください。インスタンスのデプロイメントに必要になります。

  4. これで、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
    Copy to Clipboard Toggle word wrap
  5. 使用するゾーンを設定します。

    $ gcloud config set compute/zone $zone
    Copy to Clipboard Toggle word wrap
  6. 次のコマンドを実行して、インスタンスを起動できます。

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

検証

  • 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

Red Hat Enterprise Linux AI の更新

RHEL AI の最新の z-stream バージョンに更新するには、Red Hat Enterprise Linux AI の更新 ドキュメントの手順に従ってください。

トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat