Installing
Install Red Hat Enterprise Linux AI on bare metal or in the Cloud
Abstract
Preface Copy linkLink copied to clipboard!
Red Hat Enterprise Linux AI is distributed as a bootc container image. The RHEL AI image is built on Red Hat Enterprise Linux (RHEL) 9.6. You deploy the Red Hat AI Inference Server 3.2.5 container image as a quadlet systemd service in RHEL AI.
Chapter 1. Installing RHEL AI on bare metal Copy linkLink copied to clipboard!
You can deploy Red Hat Enterprise Linux AI with the RHEL AI ISO image by using any of the following installation methods:
- RHEL GUI
- Kickstart with embedded container image
- Kickstart with custom container image
Prerequisites
-
You have downloaded and unzipped the
x86_64oraarch64Red Hat Enterprise Linux AI ISO image from the RHEL AI download page. - You have access to a bare-metal host with compatible NVIDIA CUDA or AMD ROCm AI accelerators installed.
Red Hat Enterprise Linux AI requires additional storage for the RHEL AI data.
-
The minimum recommendation for data storage in the
/homedirectory is 1 TB. -
During updates, the
bootccommand needs extra space to store temporary data. -
The minimum storage recommendation for the root
/partition is 120 GB.
Procedure
Optional: Install using the graphical installer
You can use the interactive RHEL graphical installer and the RHEL AI ISO image to deploy RHEL AI on your machine. For more information about booting a RHEL ISO by using the RHEL installation program, see Interactively installing RHEL from installation media.
Optional: Install using Kickstart with an embedded container image. You customize the RHEL AI installation by using your own Kickstart file.
Create the Kickstart file with your preferred parameters. For more information, see Creating a Kickstart file with the Kickstart configuration tool.
Sample rhelai-bootc.ks Kickstart file with embedded container image for NVIDIA CUDA AI accelerators
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Sample rhelai-bootc.ks Kickstart file with embedded container image for AMD ROCm AI accelerators
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The sample Kickstart uses the embedded container image in the ISO file, signaled by the
ostreecontainercommand with the--url=/run/install/repo/containerparameter. Thebootc switchparameter points to the Red Hat registry for future updates and then you can add your own customizations.Embed the Kickstart into the RHEL AI ISO so your machine can restart and deploy RHEL AI. Use the
mkksisoutility to embed therhelai-bootc.ksKickstart file in the boot ISO. Themkksisoutility is in theloraxrpm package.mkksiso rhelai-bootc.ks <DOWNLOADED-RHELAI-ISO> rhelai-bootc-ks.iso
$ mkksiso rhelai-bootc.ks <DOWNLOADED-RHELAI-ISO> rhelai-bootc-ks.isoCopy to Clipboard Copied! Toggle word wrap Toggle overflow Boot the machine using the updated ISO. After the installation is complete, the host reboots and you can login to the system using the credentials you added in the Kickstart file.
ImportantBe aware that having a custom Kickstart in your ISO will automatically start the installation, and disk partitioning, without prompting the user. Based on the disk configuration, local storage might be completely wiped or overwritten.
Optional: Install using Kickstart with custom container image
Follow the procedure as above for embedding the container image, but instead customize the Kickstart file to include your custom container image, for example:
Sample rhelai-bootc.ks Kickstart file with custom container image
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 2. Installing RHEL AI on AWS Copy linkLink copied to clipboard!
There are 2 ways you can install and deploy Red Hat Enterprise Linux AI on AWS:
- You can purchase RHEL AI from the AWS marketplace.
-
You can download the RHEL AI
x86_64RAW file from the Download Red Hat Enterprise Linux AI page and convert it to an Amazon Machine Image (AMI), and install using the AMI.
2.1. Converting the RHEL AI RAW image to an AMI Copy linkLink copied to clipboard!
Before deploying RHEL AI on an AWS machine, you must set up an Amazon S3 bucket, convert the RHEL AI image to an Amazon Machine Image (AMI), and create the following resources:
- S3 bucket with the RHEL AI image
- AWS EC2 snapshot
- AWS AMI
- AWS instance
Prerequisites
- You have configured an access key ID in the AWS IAM account manager.
- You have installed the AWS CLI. For more information, see Installing or updating to the latest version of the AWS CLI.
Procedure
Create an S3 bucket and set the permissions to allow image file conversion to AWS snapshots.
Create the necessary environment variables. Open a shell prompt and run the following commands:
export BUCKET=<CUSTOM_BUCKET_NAME> export RAW_AMI=nvidia-bootc.ami export AMI_NAME="rhel-ai" export DEFAULT_VOLUME_SIZE=1000
$ export BUCKET=<CUSTOM_BUCKET_NAME> $ export RAW_AMI=nvidia-bootc.ami $ export AMI_NAME="rhel-ai" $ export DEFAULT_VOLUME_SIZE=1000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the S3 bucket by running the following command:
aws s3 mb s3://$BUCKET
$ aws s3 mb s3://$BUCKETCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
trust-policy.jsonfile with the necessary configuration for generating an S3 role for your bucket:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the S3 role for your bucket. Run the following command:
aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
$ aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
role-policy.jsonfile with the necessary configurations for generating a policy for your bucket:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the policy for your bucket by running the following command:
aws iam put-role-policy --role-name vmimport --policy-name vmimport-$BUCKET --policy-document file://role-policy.json
$ aws iam put-role-policy --role-name vmimport --policy-name vmimport-$BUCKET --policy-document file://role-policy.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Copy the
x86_64RAW image URL from the Download Red Hat Enterprise Linux AI page and download the image usingcurl:curl -Lo disk.raw.gz <RAW_IMAGE_URL>
$ curl -Lo disk.raw.gz <RAW_IMAGE_URL>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Unzip the
raw.gzfile:gunzip disk.raw.gz
$ gunzip disk.raw.gzCopy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the image to the S3 bucket with the following command:
aws s3 cp disk.raw s3://$BUCKET/$RAW_AMI
$ aws s3 cp disk.raw s3://$BUCKET/$RAW_AMICopy to Clipboard Copied! Toggle word wrap Toggle overflow Convert the image to a snapshot and store it in the
TASK_IDvariable name by running the following commands:Copy to Clipboard Copied! Toggle word wrap Toggle overflow TASK_ID=$(aws ec2 import-snapshot --disk-container file://containers.json | jq -r .ImportTaskId)
$ TASK_ID=$(aws ec2 import-snapshot --disk-container file://containers.json | jq -r .ImportTaskId)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Follow the progress of the disk image to snapshot conversion job with the following command:
aws ec2 describe-import-snapshot-tasks --filters Name=task-state,Values=active
$ aws ec2 describe-import-snapshot-tasks --filters Name=task-state,Values=activeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Get the snapshot ID and store it the
SNAPSHOT_IDvariable by running the following command:SNAPSHOT_ID=$(aws ec2 describe-import-snapshot-tasks | jq -r '.ImportSnapshotTasks[] | select(.ImportTaskId=="'${TASK_ID}'") | .SnapshotTaskDetail.SnapshotId')$ SNAPSHOT_ID=$(aws ec2 describe-import-snapshot-tasks | jq -r '.ImportSnapshotTasks[] | select(.ImportTaskId=="'${TASK_ID}'") | .SnapshotTaskDetail.SnapshotId')Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add a tag name to the snapshot by running the following command:
aws ec2 create-tags --resources $SNAPSHOT_ID --tags Key=Name,Value="$AMI_NAME"
$ aws ec2 create-tags --resources $SNAPSHOT_ID --tags Key=Name,Value="$AMI_NAME"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Register the AMI from the snapshot with the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add a tag name to identify the AMI by running the following command:
aws ec2 create-tags --resources $AMI_ID --tags Key=Name,Value="$AMI_NAME"
$ aws ec2 create-tags --resources $AMI_ID --tags Key=Name,Value="$AMI_NAME"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. Deploying on AWS using the CLI Copy linkLink copied to clipboard!
You can launch the Red Hat Enterprise Linux AI AWS instance by using the RHEL AI Amazon Machine Image (AMI) from the AWS web console or by using the awscli CLI.
The following procedure describes how to use the awscli CLI to launch the AWS instance with the custom AMI.
Prerequisites
- You have created the RHEL AI AMI.
-
You have installed the awscli CLI, and configured it with your
aws_access_key_idandaws_secret_access_keyvariables. - You have configured your Virtual Private Cloud (VPC).
- You have created a subnet for your instance.
- You have created an SSH key pair.
- You have created an AWS security group on.
Procedure
Configure the various AWS parameters.
Set the
AMIvariable. Run the following command and copy the required AMI ID:aws ec2 describe-images --owners self
$ aws ec2 describe-images --owners selfCopy to Clipboard Copied! Toggle word wrap Toggle overflow AMI=<AMI_ID>
$ AMI=<AMI_ID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
SECURITY_GROUPvariable. Run the following command and copy the required security group ID:aws ec2 describe-security-groups
$ aws ec2 describe-security-groupsCopy to Clipboard Copied! Toggle word wrap Toggle overflow SECURITY_GROUP=<SECURITY_GROUP_ID>
$ SECURITY_GROUP=<SECURITY_GROUP_ID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
SUBNETvariable. Run the following command and copy the required subnet:aws ec2 describe-subnets
$ aws ec2 describe-subnetsCopy to Clipboard Copied! Toggle word wrap Toggle overflow SUBNET=<SUBNET>
$ SUBNET=<SUBNET>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
INSTANCE_TYPEvariable:INSTANCE_TYPE=<INSTANCE_TYPE_SIZE>
$ INSTANCE_TYPE=<INSTANCE_TYPE_SIZE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
INSTANCE_NAMEvariable:INSTANCE_NAME=rhel-ai-instance
$ INSTANCE_NAME=rhel-ai-instanceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the disk size variable:
DISK_SIZE=<REQUIRED_DISK_SIZE>
$ DISK_SIZE=<REQUIRED_DISK_SIZE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
KEY_NAMEvariable:KEY_NAME=<KEY_PAIR_NAME>
$ KEY_NAME=<KEY_PAIR_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create the instance by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThe default user account in the RHEL AI AMI is
cloud-user. Thecloud-useraccount has passwordlesssudoaccess.
Chapter 3. Installing RHEL AI on IBM Cloud Copy linkLink copied to clipboard!
Before you can deploy Red Hat Enterprise Linux AI on IBM Cloud, you must first convert the RHEL AI image into an IBM Cloud image.
3.1. Converting the RHEL AI QCOW2 image to an IBM Cloud image Copy linkLink copied to clipboard!
To create a bootable image in IBM Cloud you must configure your IBM Cloud accounts, set up a Cloud Object Storage (COS) bucket, and create an IBM Cloud image based on the RHEL AI image.
Prerequisites
- You have installed the IBM Cloud CLI. See Installing from the shell.
Procedure
Log in to IBM Cloud. Run the following command:
ibmcloud login
$ ibmcloud loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow When prompted, select the account to log in to.
Set up various required IBM Cloud configurations, create the COS bucket, and then generate the required QCOW2 image.
Install the required IBM Cloud plugins by running the following command:
ibmcloud plugin install cloud-object-storage infrastructure-service
$ ibmcloud plugin install cloud-object-storage infrastructure-serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the preferred resource group, for example:
ibmcloud target -g Default
$ ibmcloud target -g DefaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow Set the preferred region, for example:
ibmcloud target -r us-east
$ ibmcloud target -r us-eastCopy to Clipboard Copied! Toggle word wrap Toggle overflow Select a deployment plan for the service instance.
You can list the available deployment plans by running the following command:
ibmcloud catalog service cloud-object-storage --output json | jq -r '.[].children[] | select(.children != null) | .children[].name'
$ ibmcloud catalog service cloud-object-storage --output json | jq -r '.[].children[] | select(.children != null) | .children[].name'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
COS_DEPLOY_PLANenvironment variable with the required deployment plan, for example:COS_DEPLOY_PLAN=premium-global-deployment
$ COS_DEPLOY_PLAN=premium-global-deploymentCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a COS service instance. Run the following commands:
COS_SI_NAME=<YOUR_SERVICE_INSTANCE>
$ COS_SI_NAME=<YOUR_SERVICE_INSTANCE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow ibmcloud resource service-instance-create ${COS_SI_NAME} cloud-object-storage standard global -d ${COS_DEPLOY_PLAN}$ ibmcloud resource service-instance-create ${COS_SI_NAME} cloud-object-storage standard global -d ${COS_DEPLOY_PLAN}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create the Cloud Resource Name (CRN)
COS_CRNvariable and create the resource. Run the following commands:COS_CRN=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .crn')$ COS_CRN=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .crn')Copy to Clipboard Copied! Toggle word wrap Toggle overflow ibmcloud cos config crn --crn ${COS_CRN} --force$ ibmcloud cos config crn --crn ${COS_CRN} --forceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the COS bucket:
COS_BUCKET=<YOUR_BUCKET_NAME>
$ COS_BUCKET=<YOUR_BUCKET_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow ibmcloud cos bucket-create --bucket ${COS_BUCKET}$ ibmcloud cos bucket-create --bucket ${COS_BUCKET}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Allow the infrastructure service to read the buckets that are in the service instance
${COS_SI_GUID}variable by running the following commands:COS_SI_GUID=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .guid')$ COS_SI_GUID=$(ibmcloud resource service-instance ${COS_SI_NAME} --output json| jq -r '.[] | select(.crn | contains("cloud-object-storage")) | .guid')Copy to Clipboard Copied! Toggle word wrap Toggle overflow ibmcloud iam authorization-policy-create is cloud-object-storage Reader --source-resource-type image --target-service-instance-id ${COS_SI_GUID}$ ibmcloud iam authorization-policy-create is cloud-object-storage Reader --source-resource-type image --target-service-instance-id ${COS_SI_GUID}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Copy the QCOW2 image URL from the Download Red Hat Enterprise Linux AI page.
Download the QCOW2 image:
curl -Lo disk.qcow2 <QCOW2_IMAGE_URL>
$ curl -Lo disk.qcow2 <QCOW2_IMAGE_URL>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the name you want to use as the RHEL AI IBM Cloud image. Run the following command:
IMAGE_NAME=rhel-ai-3-2025v0
$ IMAGE_NAME=rhel-ai-3-2025v0Copy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the QCOW2 image to the COS bucket with your selected region:
ibmcloud cos upload --bucket ${COS_BUCKET} --key ${IMAGE_NAME}.qcow2 --file disk.qcow2 --region <REGION>$ ibmcloud cos upload --bucket ${COS_BUCKET} --key ${IMAGE_NAME}.qcow2 --file disk.qcow2 --region <REGION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Convert the QCOW2 image that you just uploaded to an IBM Cloud image and set the IBM Cloud image configuration
IMAGE_IDvariable:IMAGE_ID=$(ibmcloud is image-create ${IMAGE_NAME} --file cos://<REGION>/${COS_BUCKET}/${IMAGE_NAME}.qcow2 --os-name red-ai-9-amd64-nvidia-byol --output json | jq -r '.id')$ IMAGE_ID=$(ibmcloud is image-create ${IMAGE_NAME} --file cos://<REGION>/${COS_BUCKET}/${IMAGE_NAME}.qcow2 --os-name red-ai-9-amd64-nvidia-byol --output json | jq -r '.id')Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
View the progress of the job by running the following command:
while ibmcloud is image --output json ${IMAGE_ID} | jq -r .status | grep -xq pending; do sleep 1; done$ while ibmcloud is image --output json ${IMAGE_ID} | jq -r .status | grep -xq pending; do sleep 1; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow View information about the newly created image:
ibmcloud is image ${IMAGE_ID}$ ibmcloud is image ${IMAGE_ID}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Deploying on IBM Cloud using the CLI Copy linkLink copied to clipboard!
You can launch a Red Hat Enterprise Linux AI instance image from the IBM Cloud web console or the CLI. You can use whichever method of deployment you want to launch your instance. The following procedure describes using the IBM Cloud CLI to launch an RHEL AI instance.
Prerequisites
- You have created the RHEL AI IBM Cloud image.
- You have installed the IBM Cloud CLI. See Installing from the shell.
- You have configured a Virtual Private Cloud (VPC). See Creating and configuring a VPC.
- You have created a subnet for the RHEL AI instance. See Creating a subnet in VPC
Procedure
Log in to your IBM Cloud account, selecting the Account, Region and Resource Group by running the following command:
ibmcloud login -c <ACCOUNT_ID> -r <REGION> -g <RESOURCE_GROUP>
$ ibmcloud login -c <ACCOUNT_ID> -r <REGION> -g <RESOURCE_GROUP>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Before launching the IBM Cloud instance, you need to create several configuration variables.
Install the
infrastructure-serviceplugin for IBM Cloud by running the following command:ibmcloud plugin install infrastructure-service
$ ibmcloud plugin install infrastructure-serviceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create an SSH public key for your IBM Cloud account. IBM Cloud supports RSA and ed25519 keys.
ssh-keygen -f ibmcloud -t ed25519
$ ssh-keygen -f ibmcloud -t ed25519Copy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the public key to your IBM Cloud account.
ibmcloud is key-create <YOUR_IBMCLOUD_SSH_PUB_KEY> --key-type ed25519
$ ibmcloud is key-create <YOUR_IBMCLOUD_SSH_PUB_KEY> --key-type ed25519Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a floating IP for the IBM Cloud instance:
ibmcloud is floating-ip-reserve my-public-ip --zone <PREFERRED_REGION>
$ ibmcloud is floating-ip-reserve my-public-ip --zone <PREFERRED_REGION>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Select the instance profile that you want to use for the deployment. List all the profiles by running the following command:
ibmcloud is instance-profiles
$ ibmcloud is instance-profilesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Make a note of your preferred instance profile.
Create environment variables for the IBM Cloud instance, for example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can now launch your instance, by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Link the Floating IP to the instance by running the following command:
ibmcloud is floating-ip-update $FLOATING_IP --nic primary --in $NAME
$ ibmcloud is floating-ip-update $FLOATING_IP --nic primary --in $NAMECopy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3. Adding more storage to the IBM Cloud instance Copy linkLink copied to clipboard!
In IBM Cloud, there is a size restriction of 250 GB of storage in the main IBM Cloud disk. You might require more disk space for model storage. You can add more storage by attaching an extra disk to your instance.
Prerequisites
- You have installed the IBM Cloud CLI. See Installing from the shell.
- You have deployed a RHEL AI instance in IBM Cloud.
Procedure
Create the
NAMEenvironment variable:NAME=rhelai-instance
$ NAME=rhelai-instanceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
DATA_VOLUME_SIZEvariable:DATA_VOLUME_SIZE=1000
$ DATA_VOLUME_SIZE=1000Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the volume and attach it the instance by running the following command:
ibmcloud is instance-volume-attachment-add data ${NAME} \ --new-volume-name ${NAME}-data \ --profile general-purpose \ --capacity ${DATA_VOLUME_SIZE}$ ibmcloud is instance-volume-attachment-add data ${NAME} \ --new-volume-name ${NAME}-data \ --profile general-purpose \ --capacity ${DATA_VOLUME_SIZE}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Review the disks attached to the instance:
lsblk
$ lsblkCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
DISKvariable for the newly provisioned disk path, for example:DISK=/dev/vdb
$ DISK=/dev/vdbCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a partition on the disk by running the following command:
sgdisk -n 1:0:0 $DISK
$ sgdisk -n 1:0:0 $DISKCopy to Clipboard Copied! Toggle word wrap Toggle overflow Format and label the partition:
mkfs.xfs -L rhelai-data ${DISK}1$ mkfs.xfs -L rhelai-data ${DISK}1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Configure the system to auto-mount to the directory. To mount the disk to the
/mntfolder, run the following command:echo LABEL=rhelai-data /mnt xfs defaults 0 0 >> /etc/fstab
$ echo LABEL=rhelai-data /mnt xfs defaults 0 0 >> /etc/fstabCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reload the
systemdservice:systemctl daemon-reload
$ systemctl daemon-reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the disk:
mount -a
$ mount -aCopy to Clipboard Copied! Toggle word wrap Toggle overflow Grant write permissions to all users in the new file system by running the following command:
chmod 1777 /mnt/
$ chmod 1777 /mnt/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 4. Installing RHEL AI on Google Cloud Copy linkLink copied to clipboard!
Before you can deploy Red Hat Enterprise Linux AI on Google Cloud, you must first convert the RHEL AI image into an Google Cloud image.
4.1. Converting the RHEL AI tar file image into a Google Cloud image Copy linkLink copied to clipboard!
To create a bootable image in Google Cloud you must configure your Google Cloud account, create a Google Cloud Storage bucket, and convert the RHEL AI RAW image into a Google Cloud image.
Prerequisites
-
You have installed the
gcloudCLI. See Install the gcloud CLI. - You have a host with RHEL version 9.2+ installed.
- Your host has an additional 100GB of disk space available.
Procedure
Log in to
gcloud. Run the following command:gcloud auth login
$ gcloud auth loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure
gcloudand create your Google Cloud storage container.Configure the
gcloudCLI to use your project.GCLOUD_PROJECT=rhelai-gcloud-project
$ GCLOUD_PROJECT=rhelai-gcloud-projectCopy to Clipboard Copied! Toggle word wrap Toggle overflow gcloud config set project $GCLOUD_PROJECT
$ gcloud config set project $GCLOUD_PROJECTCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create an environment variable defining the region where you want to operate. For example:
gcloud_region=us-central1
$ gcloud_region=us-central1Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a storage container. Run the following commands:
GCLOUD_BUCKET=<YOUR_BUCKET_NAME>
$ GCLOUD_BUCKET=<YOUR_BUCKET_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow gsutil mb -l $gcloud_region gs://$GCLOUD_BUCKET
$ gsutil mb -l $gcloud_region gs://$GCLOUD_BUCKETCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Download the
tar.gzimage from the Download Red Hat Enterprise Linux AI page. Unzip the
tar.gzfile with the following command:gunzip <DOWNLOADED_TAR_GZ_FILE>
$ gunzip <DOWNLOADED_TAR_GZ_FILE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the
IMAGE_NAMEvariable:IMAGE_NAME=rhel-ai-gcloud
$ IMAGE_NAME=rhel-ai-gcloudCopy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the
tar.gzfile to the Google Cloud Storage Container by running the following command:gsutil cp <DOWNLOADED_TAR_GZ_FILE> "gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz"$ gsutil cp <DOWNLOADED_TAR_GZ_FILE> "gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a Google Cloud image from the
tar.gzfile:gcloud compute images create \ "$IMAGE_NAME" \ --source-uri="gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz" \ --family "rhel-ai" \ --guest-os-features=GVNIC$ gcloud compute images create \ "$IMAGE_NAME" \ --source-uri="gs://${GCLOUD_BUCKET}/$IMAGE_NAME.tar.gz" \ --family "rhel-ai" \ --guest-os-features=GVNICCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.2. Deploying your instance on Google Cloud using the CLI Copy linkLink copied to clipboard!
You can launch an Google Cloud instance from an uploaded Red Hat Enterprise Linux AI image by using the Google Cloud web console or the CLI. The following procedure describes how to use the gcloud CLI to launch the instance by using the custom image.
Prerequisites
- You have created the RHEL AI image and made it available for installation in Google Cloud.
-
You have installed the
gcloudCLI. See Install the gcloud CLI.
Procedure
Log in to your Google Cloud account by running the following command:
gcloud auth login
$ gcloud auth loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Create several
gcloudconfiguration variables for the deployment. Select the instance profile that you want to use for the deployment. List all the profiles in the required region by running the following command:
gcloud compute machine-types list --zones=<ZONE>
$ gcloud compute machine-types list --zones=<ZONE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Make a note of the preferred machine type.
Create Google Cloud instance variables, for example:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the zone.
gcloud config set compute/zone $ZONE
$ gcloud config set compute/zone $ZONECopy to Clipboard Copied! Toggle word wrap Toggle overflow Launch the Google Cloud instance:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 5. Installing RHEL AI on Microsoft Azure Copy linkLink copied to clipboard!
You can deploy Red Hat Enterprise Linux AI on Microsoft Azure by first downloading the RHEL AI VHD file, converting it to an Azure image, and then installing with the az CLI.
5.1. Converting the RHEL AI VHD image into a Azure image Copy linkLink copied to clipboard!
To create a bootable image on Azure you must configure your Azure account, create an Azure storage container, and create an Azure image from the RHEL AI VHD image.
Prerequisites
-
You have installed the
azCLI. See Azure Command-Line Interface (CLI) documentation. - You have installed AzCopy. See Get started with AzCopy.
Procedure
Log in to Azure by running the following command:
az login
$ az loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Log in with the
azcopytool:keyctl new_session
$ keyctl new_sessionCopy to Clipboard Copied! Toggle word wrap Toggle overflow azcopy login
$ azcopy loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure various Azure environment variables and create your Azure storage container.
Create an environment variable defining the location of your instance with the following command:
AZ_LOCATION=eastus
$ AZ_LOCATION=eastusCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
AZ_RESOURCE_GROUPenvironment variable. For example:AZ_RESOURCE_GROUP=Default az group create --name ${AZ_RESOURCE_GROUP} --location ${AZ_LOCATION}$ AZ_RESOURCE_GROUP=Default $ az group create --name ${AZ_RESOURCE_GROUP} --location ${AZ_LOCATION}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the Azure storage account:
AZ_STORAGE_ACCOUNT=<YOUR_STORAGE_ACCOUNT_NAME>
$ AZ_STORAGE_ACCOUNT=<YOUR_STORAGE_ACCOUNT_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow az storage account create \ --name ${AZ_STORAGE_ACCOUNT} \ --resource-group ${AZ_RESOURCE_GROUP} \ --location ${AZ_LOCATION} \ --sku Standard_LRS$ az storage account create \ --name ${AZ_STORAGE_ACCOUNT} \ --resource-group ${AZ_RESOURCE_GROUP} \ --location ${AZ_LOCATION} \ --sku Standard_LRSCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the Azure storage container. Run the following commands:
AZ_STORAGE_CONTAINER=<BUCKET_NAME>
$ AZ_STORAGE_CONTAINER=<BUCKET_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow az storage container create \ --name ${AZ_STORAGE_CONTAINER} \ --account-name ${AZ_STORAGE_ACCOUNT} \ --public-access off$ az storage container create \ --name ${AZ_STORAGE_CONTAINER} \ --account-name ${AZ_STORAGE_ACCOUNT} \ --public-access offCopy to Clipboard Copied! Toggle word wrap Toggle overflow Get the Subscription ID from the Azure account list by running the following command:
az account list --output table
$ az account list --output tableCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create the
AZ_SUBSCRIPTION_IDvariable. For example:AZ_SUBSCRIPTION_ID=46c08fb3-83c5-4b59-8372-bf9caf15a681
$ AZ_SUBSCRIPTION_ID=46c08fb3-83c5-4b59-8372-bf9caf15a681Copy to Clipboard Copied! Toggle word wrap Toggle overflow Grant
azcopywrite permission to user into the storage container. For example:az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope /subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/${AZ_RESOURCE_GROUP}/providers/Microsoft.Storage/storageAccounts/${AZ_STORAGE_ACCOUNT}/blobServices/default/containers/${AZ_STORAGE_CONTAINER}$ az role assignment create \ --assignee user@example.com \ --role "Storage Blob Data Contributor" \ --scope /subscriptions/${AZ_SUBSCRIPTION_ID}/resourceGroups/${AZ_RESOURCE_GROUP}/providers/Microsoft.Storage/storageAccounts/${AZ_STORAGE_ACCOUNT}/blobServices/default/containers/${AZ_STORAGE_CONTAINER}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Download the Azure VHD image from Download Red Hat Enterprise Linux AI page.
Unzip the
vhd.gzfile with the following command:gunzip <DOWNLOADED_AZURE_GZ_IMAGE>
$ gunzip <DOWNLOADED_AZURE_GZ_IMAGE>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Azure image name:
IMAGE_NAME=rhel-ai-azure
$ IMAGE_NAME=rhel-ai-azureCopy to Clipboard Copied! Toggle word wrap Toggle overflow Upload the VHD file to the Azure storage container by running the following command:
AZ_VHD_URL="https://${AZ_STORAGE_ACCOUNT}.blob.core.windows.net/${AZ_STORAGE_CONTAINER}/$(basename ${vhd_file})" azcopy copy "$vhd_file" "$AZ_VHD_URL"$ AZ_VHD_URL="https://${AZ_STORAGE_ACCOUNT}.blob.core.windows.net/${AZ_STORAGE_CONTAINER}/$(basename ${vhd_file})" $ azcopy copy "$vhd_file" "$AZ_VHD_URL"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an Azure image from the uploaded VHD file. Run the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.2. Deploying the RHEL AI instance on Azure by using the az CLI Copy linkLink copied to clipboard!
You can launch the Red Hat Enterprise Linux AI instance by using the RHEL AI image from the Azure web console or by using the az CLI.
The following procedure describes how to use the az CLI to launch the RHEL AI instance with the downloaded image.
Prerequisites
- You have created the RHEL AI Azure image.
-
You have installed the
azCLI. See Azure Command-Line Interface (CLI) documentation.
Procedure
Log in to your Azure account:
az login
$ az loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Select the instance profile that you want to use for the deployment. List all the profiles in the required region by running the following command:
az vm list-sizes --location <REGION> --output table
$ az vm list-sizes --location <REGION> --output tableCopy to Clipboard Copied! Toggle word wrap Toggle overflow Creating the Azure instance.#
Configure environment variables for the instance.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Launch the RHEL AI instance by running the following command:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 6. Updating RHEL AI Copy linkLink copied to clipboard!
You can update RHEL AI to the latest version.
Prerequisites
- You have installed and deployed a Red Hat Enterprise Linux AI instance on one of the supported platforms.
- You have created a Red Hat registry account.
- You have root user access on the host.
Procedure
Log in to your Red Hat registry account with
podmanorskopeo, for example:sudo podman login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.json
$ sudo podman login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow sudo skopeo login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.json
$ sudo skopeo login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update to the latest minor version of Red Hat Enterprise Linux AI by using the relevant
bootcimage for your machine, for example:sudo bootc switch registry.redhat.io/rhelai1/bootc-cuda-rhel9:{product-version}$ sudo bootc switch registry.redhat.io/rhelai1/bootc-cuda-rhel9:{product-version}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy the
/etc/skel/.config/containers/storage.confstorage configuration to your<USER_HOME>/.config/containers/storage.confhome directory before re-initializing. Run the following command:cp /etc/skel/.config/containers/storage.conf <USER_HOME>/.config/containers/storage.con
$ cp /etc/skel/.config/containers/storage.conf <USER_HOME>/.config/containers/storage.conCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Alternatively, update to the latest z-stream version of Red Hat Enterprise Linux AI by running the following command:
sudo bootc update --apply
$ sudo bootc update --applyCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the system:
sudo reboot -n
$ sudo reboot -nCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 7. Configuring additional persistent storage for the RHEL AI instance Copy linkLink copied to clipboard!
Some cloud or bare-metal instances might not have enough storage on the default disk to run RHEL AI and store downloaded models. You can configure additional storage for Red Hat Enterprise Linux AI to store models and data.
Prerequisites
- You have deployed a Red Hat Enterprise Linux AI instance.
- You have attached and formatted an additional storage volume to your instance.
Procedure
Review the disks attached to the instance:
lsblk
$ lsblkCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a
DISKvariable for the newly provisioned disk path. For example:DISK=/dev/vdb
$ DISK=/dev/vdbCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the system to automatically mount the disk to the
/mntdirectory. Add an entry to/etc/fstab:echo "${DISK} /mnt xfs defaults 0 0" | sudo tee -a /etc/fstab$ echo "${DISK} /mnt xfs defaults 0 0" | sudo tee -a /etc/fstabCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteReplace
xfswith your disk’s file system type if different (for example,ext4).Reload the
systemdservice:sudo systemctl daemon-reload
$ sudo systemctl daemon-reloadCopy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the disk:
sudo mount -a
$ sudo mount -aCopy to Clipboard Copied! Toggle word wrap Toggle overflow Grant appropriate permissions to the mounted directory:
sudo chmod 1777 /mnt/
$ sudo chmod 1777 /mnt/Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the disk is mounted correctly:
df -h /mnt
$ df -h /mntCopy to Clipboard Copied! Toggle word wrap Toggle overflow