AWS
Using GPU Instances
Using GPU Instances
Using a GPU requires creating an Amazon Machine Image (AMI) in your desired AWS region. If you are using the For other regions, use the below section to create a GPU AMI.
ap-southeast-2
region, a public AMI is already available.Currently P2, P3, G4dn & G6 AWS EC2 Instances have been tested.line
Creating a GPU Amazon Machine Image (AMI)
Creating a GPU Amazon Machine Image (AMI)
To use GPU instances in other AWS regions, follow the process below to create your own AMI. This involves downloading and preparing a Talos OS image for use as an Amazon Machine Image (AMI) in AWS.The Talos OS image is first downloaded and decompressed, then uploaded to an Amazon S3 bucket. From there, it is imported into AWS as an Elastic Block Store (EBS) snapshot. The script monitors the import progress until it is complete. Once the snapshot is ready, it is registered as an AMI with the necessary configurations, such as storage settings and virtualization type. This AMI can then be used to launch EC2 instances running Talos OS.The Talos Linux Image Factory, developed by Sidero Labs, Inc., offers a method to download various boot assets for Talos Linux.
The below URL downloads the Talos v1.8.3 OS image with NVIDIA GPU extensions required for Kubox.The image is then decompressed using the The decompressed file is then uploaded to the specified S3 bucket:Once uploaded, the image is imported as an EBS snapshot using the import-snapshot command:Store the The script continuously checks the status of the import task. It waits for the status state to become Once the snapshot is ready, the script registers it as an AMI:Finally, check that the image exists.
xz
command:ImportTaskId
for monitoring the import progress.completed
, and then retrieves the Snapshot ID.Role for Kubox EC2 instances
Role for Kubox EC2 instances
To create an AWS IAM role, attach the AWS managed policy called Then create the instance profileAdn add the role to the instance profileAnd run this command to attach the AWS Managed
AmazonEBSCSIDriverPolicy
. This policy grants the necessary permissions to manage Amazon EBS volumes using Kubernetes’ Container Storage Interface (CSI). It enables Kubox to dynamically create EBS volumes, making it possible to run stateful workloads.Run this command to create the IAM roleAmazonEBSCSIDriverPolicy
policy:Policy for Creating and Deleting AWS Resources
Policy for Creating and Deleting AWS Resources
This policy is optional but highly recommended, as it provides the essential permissions required for users or groups to create and delete kubox clusters.The Run this command to create the policy.
KuboxCreatorAccess
policy allows for the creation, management, and deletion of AWS resources, including EC2 instances, networking components (such as VPCs, subnets, security groups, and routes), and Elastic Load Balancing (ELB) resources. It is crucial to assign this policy only to trusted roles or groups to ensure security.