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.4.0-ea.1 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
ostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification # Switch bootc to point to Red Hat container image for upgrades %post bootc switch --mutate-in-place --transport registry registry.redhat.io/rhelai3/bootc-cuda-rhel9:3.4.0-ea.1 touch /etc/cloud/cloud-init.disabled %end # Customize target system network environment network --bootproto=dhcp --device=link --activate # Customize target system disk partitioning clearpart --all --initlabel --disklabel=gpt reqpart --add-boot part / --grow --fstype xfs # Optional: customize services firewall --disabled services --enabled=sshd # Optional: add a user user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD> sshkey --username cloud-user "<SSH_PUB_KEY>" # Optional: add a root user SSH public key rootpw --iscrypted locked sshkey --username root <SSH_ROOT_PUB_KEY>" rebootSample rhelai-bootc.ks Kickstart file with embedded container image for AMD ROCm AI accelerators
ostreecontainer --url=/run/install/repo/container --transport=oci --no-signature-verification # Switch bootc to point to Red Hat container image for upgrades %post bootc switch --mutate-in-place --transport registry registry.redhat.io/rhelai3/bootc-rocm-rhel9:3.4.0-ea.1 touch /etc/cloud/cloud-init.disabled %end # Customize target system network environment network --bootproto=dhcp --device=link --activate # Customize target system disk partitioning clearpart --all --initlabel --disklabel=gpt reqpart --add-boot part / --grow --fstype xfs # Optional: customize services firewall --disabled services --enabled=sshd # Optional: add a user user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD> sshkey --username cloud-user "<SSH_PUB_KEY>" # Optional: add a root user SSH public key rootpw --iscrypted locked sshkey --username root <SSH_ROOT_PUB_KEY>" rebootThe 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.isoBoot 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
# Customize target system network environment network --bootproto=dhcp --device=link --activate # Customize target system disk partitioning clearpart --all --initlabel --disklabel=gpt reqpart --add-boot part / --grow --fstype xfs # Apply the custom bootc container ostreecontainer --url <CUSTOM_CONTAINER_IMAGE_REGISTRY_URL> # Optional: customize services firewall --disabled services --enabled=sshd # Optional: add a user user --name=cloud-user --groups=wheel --plaintext --password <YOUR_PASSWORD> sshkey --username cloud-user "<SSH_PUB_KEY>" # Optional: add a root user SSH public key rootpw --iscrypted locked sshkey --username root <SSH_ROOT_PUB_KEY>" reboot
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=1000Create the S3 bucket by running the following command:
$ aws s3 mb s3://$BUCKETCreate the
trust-policy.jsonfile with the necessary configuration for generating an S3 role for your bucket:$ printf '{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "vmie.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "sts:Externalid": "vmimport" } } } ] }' > trust-policy.jsonCreate the S3 role for your bucket. Run the following command:
$ aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.jsonCreate the
role-policy.jsonfile with the necessary configurations for generating a policy for your bucket:$ printf '{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::%s", "arn:aws:s3:::%s/*" ] }, { "Effect": "Allow", "Action": [ "ec2:ModifySnapshotAttribute", "ec2:CopySnapshot", "ec2:RegisterImage", "ec2:Describe*" ], "Resource": "*" } ] }' $BUCKET $BUCKET > role-policy.jsonCreate 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
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>Unzip the
raw.gzfile:$ gunzip disk.raw.gzUpload the image to the S3 bucket with the following command:
$ aws s3 cp disk.raw s3://$BUCKET/$RAW_AMIConvert the image to a snapshot and store it in the
TASK_IDvariable name by running the following commands:$ printf '{ "Description":"rhelai-image", "Format":"raw", "UserBucket":{ "S3Bucket":"%s", "S3Key":"%s" } }' $BUCKET $RAW_AMI > containers.json$ TASK_ID=$(aws ec2 import-snapshot --disk-container file://containers.json | jq -r .ImportTaskId)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=activeGet 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')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"Register the AMI from the snapshot with the following command:
$ AMI_ID=$(aws ec2 register-image \ --name "$AMI_NAME" \ --description "$AMI_NAME" \ --architecture x86_64 \ --root-device-name /dev/sda1 \ --block-device-mappings "DeviceName=/dev/sda1,Ebs={VolumeSize=${DEFAULT_VOLUME_SIZE},SnapshotId=${SNAPSHOT_ID}}" \ --virtualization-type hvm \ --ena-support \ | jq -r .ImageId)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"
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$ AMI=<AMI_ID>Set the
SECURITY_GROUPvariable. Run the following command and copy the required security group ID:$ aws ec2 describe-security-groups$ SECURITY_GROUP=<SECURITY_GROUP_ID>Set the
SUBNETvariable. Run the following command and copy the required subnet:$ aws ec2 describe-subnets$ SUBNET=<SUBNET>Set the
INSTANCE_TYPEvariable:$ INSTANCE_TYPE=<INSTANCE_TYPE_SIZE>Set the
INSTANCE_NAMEvariable:$ INSTANCE_NAME=rhel-ai-instanceSet the disk size variable:
$ DISK_SIZE=<REQUIRED_DISK_SIZE>Set the
KEY_NAMEvariable:$ KEY_NAME=<KEY_PAIR_NAME>
Create the instance by running the following command:
$ 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'}]'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 loginWhen 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-serviceSet the preferred resource group, for example:
$ ibmcloud target -g DefaultSet the preferred region, for example:
$ ibmcloud target -r us-eastSelect 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'Set the
COS_DEPLOY_PLANenvironment variable with the required deployment plan, for example:$ COS_DEPLOY_PLAN=premium-global-deploymentCreate a COS service instance. Run the following commands:
$ COS_SI_NAME=<YOUR_SERVICE_INSTANCE>$ ibmcloud resource service-instance-create ${COS_SI_NAME} cloud-object-storage standard global -d ${COS_DEPLOY_PLAN}
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')$ ibmcloud cos config crn --crn ${COS_CRN} --forceCreate the COS bucket:
$ COS_BUCKET=<YOUR_BUCKET_NAME>$ ibmcloud cos bucket-create --bucket ${COS_BUCKET}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')$ ibmcloud iam authorization-policy-create is cloud-object-storage Reader --source-resource-type image --target-service-instance-id ${COS_SI_GUID}
- 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>Set the name you want to use as the RHEL AI IBM Cloud image. Run the following command:
$ IMAGE_NAME=rhel-ai-3-2025v0Upload 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>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')
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; doneView information about the newly created image:
$ ibmcloud is image ${IMAGE_ID}
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>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-serviceCreate an SSH public key for your IBM Cloud account. IBM Cloud supports RSA and ed25519 keys.
$ ssh-keygen -f ibmcloud -t ed25519Upload the public key to your IBM Cloud account.
$ ibmcloud is key-create <YOUR_IBMCLOUD_SSH_PUB_KEY> --key-type ed25519Create a floating IP for the IBM Cloud instance:
$ ibmcloud is floating-ip-reserve my-public-ip --zone <PREFERRED_REGION>
Select the instance profile that you want to use for the deployment. List all the profiles by running the following command:
$ ibmcloud is instance-profilesMake a note of your preferred instance profile.
Create environment variables for the IBM Cloud instance, for example:
NAME=<INSTANCE_NAME> VPC=<YOUR_VPC> ZONE=<YOUR_IBM_CLOUD_ZONE> SUBNET=<ZONE_SUBNET> INSTANCE_PROFILE=<YOUR_CLOUD_INSTANCE_PROFILE> IMAGE=<YOUR_IBM_CLOUD_RHELAI_IMAGE> SSHKEY=<YOUR_IBMCLOUD_SSH_PUB_KEY> FLOATING_IP=<PUBLIC_IP> DISK_SIZE=250You can now launch your instance, by running the following command:
$ ibmcloud is instance-create \ $NAME \ $VPC \ $ZONE \ $INSTANCE_PROFILE \ $SUBNET \ --image $IMAGE \ --keys $SSHKEY \ --boot-volume '{"name": "'${NAME}'-boot", "volume": {"name": "'${NAME}'-boot", "capacity": '${DISK_SIZE}', "profile": {"name": "general-purpose"}}}' \ --allow-ip-spoofing falseLink the Floating IP to the instance by running the following command:
$ ibmcloud is floating-ip-update $FLOATING_IP --nic primary --in $NAME
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-instanceCreate the
DATA_VOLUME_SIZEvariable:$ DATA_VOLUME_SIZE=1000Create 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}Review the disks attached to the instance:
$ lsblkCreate a
DISKvariable for the newly provisioned disk path, for example:$ DISK=/dev/vdbCreate a partition on the disk by running the following command:
$ sgdisk -n 1:0:0 $DISKFormat and label the partition:
$ mkfs.xfs -L rhelai-data ${DISK}1Optional: 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/fstabReload the
systemdservice:$ systemctl daemon-reloadMount the disk:
$ mount -aGrant write permissions to all users in the new file system by running the following command:
$ chmod 1777 /mnt/
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 loginConfigure
gcloudand create your Google Cloud storage container.Configure the
gcloudCLI to use your project.$ GCLOUD_PROJECT=rhelai-gcloud-project$ gcloud config set project $GCLOUD_PROJECTCreate an environment variable defining the region where you want to operate. For example:
$ gcloud_region=us-central1Create a storage container. Run the following commands:
$ GCLOUD_BUCKET=<YOUR_BUCKET_NAME>$ gsutil mb -l $gcloud_region gs://$GCLOUD_BUCKET
-
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>Configure the
IMAGE_NAMEvariable:$ IMAGE_NAME=rhel-ai-gcloudUpload 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"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
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-
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>Make a note of the preferred machine type.
Create Google Cloud instance variables, for example:
NAME=rhelai-instance ZONE=us-central1-a MACHINE_TYPE=a3-highgpu-8g ACCELERATOR="type=nvidia-h100-80gb,count=8" IMAGE=custom-rhelai-image DISK_SIZE=1024 SUBNET=defaultConfigure the zone.
$ gcloud config set compute/zone $ZONELaunch the Google Cloud instance:
$ 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
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 loginLog in with the
azcopytool:$ keyctl new_session$ azcopy loginConfigure 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=eastusCreate the
AZ_RESOURCE_GROUPenvironment variable. For example:$ AZ_RESOURCE_GROUP=Default $ az group create --name ${AZ_RESOURCE_GROUP} --location ${AZ_LOCATION}Create the Azure storage account:
$ AZ_STORAGE_ACCOUNT=<YOUR_STORAGE_ACCOUNT_NAME>$ az storage account create \ --name ${AZ_STORAGE_ACCOUNT} \ --resource-group ${AZ_RESOURCE_GROUP} \ --location ${AZ_LOCATION} \ --sku Standard_LRSCreate the Azure storage container. Run the following commands:
$ AZ_STORAGE_CONTAINER=<BUCKET_NAME>$ az storage container create \ --name ${AZ_STORAGE_CONTAINER} \ --account-name ${AZ_STORAGE_ACCOUNT} \ --public-access offGet the Subscription ID from the Azure account list by running the following command:
$ az account list --output tableCreate the
AZ_SUBSCRIPTION_IDvariable. For example:$ AZ_SUBSCRIPTION_ID=46c08fb3-83c5-4b59-8372-bf9caf15a681Grant
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}
- 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>Set the Azure image name:
$ IMAGE_NAME=rhel-ai-azureUpload 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"Create an Azure image from the uploaded VHD file. Run the following command:
$ az image create --resource-group $AZ_RESOURCE_GROUP \ --name "$IMAGE_NAME" \ --source "${AZ_VHD_URL}" \ --location ${AZ_LOCATION} \ --os-type Linux \ --hyper-v-generation V2
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 loginSelect 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 tableCreating the Azure instance.#
Configure environment variables for the instance.
NAME=my-rhelai-instance AZ_LOCATION=eastus AZ_RESOURCE_GROUP=<YOUR_AZURE_RESOURCE_GROUP> AZ_ADMIN_USERNAME=azureuser AZ_VM_SIZE=Standard_ND96isr_H100_v5 AZ_IMAGE=my-rhelai-image SSHPUBKEY=$HOME/.ssh/id_rsa.pub DISK_SIZE=1024
Launch the RHEL AI instance by running the following command:
$ az vm create \ --resource-group $AZ_RESOURCE_GROUP \ --name ${NAME} \ --image ${AZ_IMAGE} \ --size ${AZ_VM_SIZE} \ --location ${AZ_LOCATION} \ --admin-username ${AZ_ADMIN_USERNAME} \ --ssh-key-values @$SSHPUBKEY \ --authentication-type ssh \ --nic-delete-option Delete \ --accelerated-networking true \ --os-disk-size-gb 1024 \ --os-disk-name ${NAME}-${AZ_LOCATION}
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 skopeo login registry.redhat.io --username <USER_NAME> --password <PASSWORD> --authfile /etc/ostree/auth.jsonUpdate 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}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
Alternatively, update to the latest z-stream version of Red Hat Enterprise Linux AI by running the following command:
$ sudo bootc update --applyRestart the system:
$ sudo reboot -n
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 Red Hat Enterprise Linux AI instance.
Procedure
Review the disks attached to the instance:
$ lsblkCreate a
DISKvariable for the newly provisioned disk path. For example:$ DISK=/dev/vdbConfigure 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/fstabNoteReplace
xfswith your disk’s file system type if different (for example,ext4).Reload the
systemdservice:$ sudo systemctl daemon-reloadMount the disk:
$ sudo mount -aCreate folders for Red Hat AI Inference Server data on the mounted disk:
$ sudo mkdir -p /mnt/rhaiis/cache /mnt/rhaiis/models /mnt/rhaiis/tmp /mnt/rhaiis/config /mnt/vllm /mnt/flashinferGrant appropriate permissions to the mounted directory:
$ sudo chmod u+rwX /mnt/$ sudo chown -R 1001:root /mnt/If the configuration file does not already exist, create it by copying the example file:
$ sudo cp /etc/containers/systemd/rhaiis.container.d/install.conf.example /etc/containers/systemd/rhaiis.container.d/install.confConfigure Red Hat AI Inference Server to use the additional storage by editing the configuration file:
$ sudo vi /etc/containers/systemd/rhaiis.container.d/install.confAdd the following environment variables to the
[Container]section:[Container] # Configure cache locations to use the additional storage disk Environment=VLLM_CACHE_ROOT=/mnt/vllm Environment=FLASHINFER_WORKSPACE_BASE=/mnt/flashinferExpand Table 7.1. Storage configuration parameters Parameter Description VLLM_CACHE_ROOTLocation where vLLM stores compiled kernels and other cache files.
FLASHINFER_WORKSPACE_BASELocation where FlashInfer stores JIT-compiled kernel workspaces.
Update the volume mounts in the Red Hat AI Inference Server container configuration to include the additional storage paths. Edit the main container file:
$ sudo vi /etc/containers/systemd/rhaiis.containerReplace the existing
Volumelines with the following updated volume mounts that point to the additional storage disk. Delete the following existing lines:Volume=/var/lib/rhaiis/cache:/opt/app-root/src/.cache:Z Volume=/var/lib/rhaiis/models:/opt/app-root/src/models:Z Volume=/var/lib/rhaiis/tmp:/tmp:Z Volume=/var/lib/rhaiis/config:/opt/app-root/src/.config:ZReplace them with:
Volume=/mnt/rhaiis/cache:/opt/app-root/src/.cache:Z Volume=/mnt/rhaiis/models:/opt/app-root/src/models:Z Volume=/mnt/rhaiis/tmp:/tmp:Z Volume=/mnt/rhaiis/config:/opt/app-root/src/.config:Z Volume=/mnt/vllm:/mnt/vllm:Z Volume=/mnt/flashinfer:/mnt/flashinfer:ZReload the systemd configuration:
$ sudo systemctl daemon-reloadRestart the Red Hat AI Inference Server service to apply the changes:
$ sudo systemctl restart rhaiis
Verification
Verify that the disk is mounted correctly:
$ df -h /mntThe additional storage disk mounted at
/mntis listed.Verify that Red Hat AI Inference Server is using the additional storage by checking the container mounts:
$ sudo podman inspect rhaiis --format '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{"\n"}}{{end}}'The output lists the 6 volume mounts, all of which are
/mntpaths mapped to their corresponding container destinations.