Creating an EC2 instance


This topic describes how to create an EC2 instance optimized for deploying and extracting the best performance from theBMC AMI AI Services.

Before you begin

The infrastructure required for optimal performance with BMC AMI AI Services is as follows:

Configuration option

LLM

AWS

Recommended

Mixtral8x7b-instruct Quantized

g5.12xlarge

Mid-level

Meta-Llama-3-8B-instruct 4K Quantized (GPU)

g5.4xlarge

Entry level

Meta-Llama-3-8B-instruct 4K Quantized (CPU)

c6in.8xlarge

If you cannot temporarily procure GPU-enabled machines and decide to proceed with the entry-level configuration, be aware that the performance of BMC AMI AI Services will be significantly slower, and some features might be unavailable.

If you don't already have them, create a Virtual Private Cloud (VPC), set up subnets, and configure an Internet Gateway as follows. If you already have them, you can reuse them later in the deployment process.

  1. Sign in to your AWS account.
  2. Open the Amazon VPC console athttps://console.aws.amazon.com/vpcconsole.

  3. On the VPC console dashboard, click Create VPC.
  4. Keep all unspecified values at their default settings in the following steps.
  5. In the VPC settings field, click VPC and more.
  6. For ... name, enter a name such as BMC-AMI-AI-Services.
  7. Enter the IPv4 CIDR block value. For example, 10.0.0.0/16.
  8. For Number of private subnets, select 0 (zero).
  9. For VPC endpoints, select None.
  10.  Click Create VPC.

To create an EC2 instance

  1. Sign in to your AWS account.
  2. Open the Amazon EC2 console athttps://console.aws.amazon.com/ec2/.

  3. On the EC2 console dashboard, in the Launch instance area, click Launch instance.
  4. In the Name field, in the Name and tags area, enter a name (for example, AMIAI_VM).
  5. In the search box in the Application and OS Images area, enter Deep Learning OSS Nvidia Driver AMI GPU PyTorch.
    image-2024-10-4_11-33-36.png
  6. From the search results, select Ubuntu/Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.2 or later (Ubuntu 20.04).
    worddav96f07fb3dc53bf76a4d5c39fb92615df.png
  7. In the Instance type area, from the menu, we recommend you select g5.12xlarge for optimal performance.
    worddavf816356b2125ef501e972ad90b1a61f0.png
  8. In the Key pair (login) area, click Create new key pair and follow these steps: 
    1. Enter a key pair name (for example, AMIAI_KeyPair).
    2. Select RSA for the key pair type.
    3. Select .ppk for the Private Key file format.
    4. Click Create key pair to download the .ppk file. Store it at a safe location.
  9. In the Network settings area, click Edit.
    worddav3893ec7376f2f75c714afce0bf978858.png
  10. For VPC, select the VPC you created in the previous step.
    image-2024-10-4_11-35-11.png
  11. From the Auto-assign public IP, select Enable.
  12. For Firewall, click Create security group.
  13. For Inbound Security Group Rules, delete all rules except for the ssh type.
  14. From the SSH Source type, select My IP. Only your machine has SSH access to this EC2 instance.
    image-2024-10-14_15-48-1.png
  1. In the Configure storage area, modify the storage in accordance with your needs.
    image-2024-10-4_11-35-59.png
  2. In the Summary area, enter the number of instances of EC2 required.
    worddav5d40d0f2a36ed9386de7d94e4b7d3a9d.png
  3. Click Launch instance.
    worddavb7b2f02b4f2088c6faac8b46cdee79c8.png
  4. A confirmation page indicates that your instance is launching. Click View all instances to close the confirmation page and return to the console.
  5. In the Instances area, you can view the launch status of your EC2 instance. Launching an instance takes a short time. When you launch an instance, its initial state is Pending. After the instance starts, its state changes to Running and receives a public DNS name.
    image-2024-10-4_11-36-27.png
  6. Click the Instance ID to launch your instance.
  7. Note down the Public and Private IPs and their DNS names.
    image-2024-10-4_11-37-55.png
  8. To add the inbound rules, see https://docs.aws.amazon.com/finspace/latest/userguide/step5-config-inbound-rule.html.

    1. Add an inbound rule to the EC2 instance public IP address to allow traffic on port 8000.
    2. If you deployed the BMC AMI AI Services on zCX/zLinux then add the inbound rule to the zCX/zLinux instance IP address to port 4000.
    3. If the load balancer is not created, then add an inbound rule on port 8000. You can allow the port either internally or globally.
    4. You must allow all traffic and sources to point to the security group.
      image-2024-10-14_15-50-0.png

Where to go from here

See Creating-an-Application-Load-Balancer.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*