Tag Archives: Amazon Elastic Cloud


Alea GPU on Amazon EC2 Instances

The Amazon Elastic Compute Cloud (Amazon EC2) provides resizable compute capacity in the cloud. EC2 offers a wide selection of instance types optimized to fit different use cases. For GPU applications, the g2.2xlarge instance has 8 CPU core and 1 GRID K520 GPU, the larger g2.8xlarge instance has 32 CPU cores and 4 GRID K520 GPUs.

To simplify the utilization of Alea GPU on EC2 we created two community AMIs (Amazon Machine Images) with up to date CUDA drivers and pre-installed tools so that you can start using Alea GPU right away:

  • win2012r2-cuda70-vsc2013 with AMI ID ami-ab1ef4c0 is Windows Server 2012 R2 image with Visual Studio 2013 Community Edition and TightVNC server.win-ami
  • ubuntu14.04-cuda70-mono with AMI ID ami-670ee40c is an Ubuntu Trusty Tahr 14.04 image and comes with Mono.ubuntu-ami

On both AMIs an up to date GRID GPU driver and the CUDA toolkit 7.0 is installed. The AMIs can be used out of the box to experiment with Alea GPU on either Windows or Linux.

The AMIs are available in the geographic location US East (N. Virginia).

Using GRID K520 GPUs on Windows

On Windows the GRID K520 GPUs do not support the TCC mode, which means that they cannot be used with a Remote Desktop connection. The simple way out is to use a VNC server or TeamViewer. The AMI win2012r2-cuda70-vsc2013 has therefore TightVNC server pre-installed. It is launched at system boot time as a Windows service. The VNC server listens on port 5900. The password for connection and configuration is vncxyz. These settings can be changed easily after booting.

Booting an Instance of the Windows AMI win2012r2-cuda70-vsc2013

We assume that you have an AWS account and that you created a key pair.
Here are the steps to launch an instance of the AMI win2012r2-cuda70-vsc2013:

    1. Log on to the AWS console and select the EC2 Dashboard. If you do not yet have a key pair select Key Pairs under Network & Security and follow the instructions. Also make sure that you selected the geographic location US East (N. Virginia) (or any other location on which the AMIs are available) in the top right corner.ec2-dashboard
    2. Press the Launch Instance button to get to the Quick Start wizard.
    3. Select the Community AMIs and enter win2012r2-cuda70-vsc2013 in the search field. Press Select.


    1. Scroll down to find the G2 instances. Select either g2.2xlarge or g2.8xlarge. Note that both instances are paid. Press Next: Configure Instance Details.


  1. Choose the Purchasing options. Spot instances are usually less expensive but may not be available immediately or may be interrupted if the spot price rises above the user supplied spot price limit. Also note that instances purchased at spot price cannot be stopped. Press Next: Add Storage.ec2-launch-3
  2. Increase the partition size or add additional storage as required. Skip Next: Tag Instance and proceed to Configure Security Groupec2-launch-4
  3. Create a security group with custom TCP rule for port 5900 or port range 5900-5910. This is required to connect via VNC to the instance. The RDP port rule for port 3389 is added by default. Press Review and Launch.ec2-launch-6
  4. Review your settings and press Launch.ec2-launch-7
  5. Choose your key pair for this instance. Press Launch Instances.ec2-launch-8
  6. The Launch Status window appears. Press View Instances.ec2-launch-9
  7. The instance boot process takes some time. After successful booting the instance is visible under Instances. Select the desired instance and press Connect.ec2-launch-10
  8. A popup window appears where you can download the Remote Desktop File and get the password to connect to the instance.ec2-launch-11
  9. To decrypt the password you have to supply the private key file that you generated at the beginning.ec2-launch-12
  10. To decrypt the password you have to supply the private key file that you generated at the beginning. Press Decrypt Password to get the Administrator password.ec2-launch-13
  11. Start a VNC client, such as TightVNC and connect to the instance. Enter the IP address followed by the port number 5900 and press Connect.ec2-launch-14
  12. Supply the password vncxyz.ec2-launch-15
  13. Send Ctrl-Alt-Del.ec2-launch-16
  14. Provide the password that you decrypted before. You may start the on screen keyboard if you have difficulties to enter the special characters in the password.ec2-launch-17
  15. Once connected, start a command line console and execute nvidia-smi to verify if the GRID K520 GPUs are visible.win-nvidia-smi

Booting an Instance of the Ubuntu AMI ubuntu14.04-cuda70-mono

Linux does not have the issue with the TCC mode.

Starting a instance of the Ubuntu AMI is very similar. The main difference is that the security group has to have a port rule for SSH on port 22. Then you connect directly with ssh to the instance.

If you want to experiment with the CUDA debugger use the Windows AMI win2012r2-cuda70-vsc2013 with pre-installed Visual Studio 2013 Community Edition.

Exploring Alea GPU

Now you can start exploring Alea GPU.

Important: the GRID K520 GPU is an enterprise GPU. Send us a mail to support(at)quantalea.com or sales(at)quantalea.com to request a temporary demo license.


Install Alea.cuBase License on Amazon Elastic Compute Cloud

Alea.cuBase licenses rely on a fingerprint of the running hardware. For an Amazon EC2 cloud machine, the hardware keeps changing. In this case, in order to install an Alea.cuBase license you have to create a Virtual Private Cloud (VPC), then use a Elastic Network Interface (ENI) in that VPC, which retains a static MAC address. In this article, I will show you how to setup a VPC, and start a EC2 instance in that VPC, which has an ENI attached. With this setting, we can generate a meaningful fingerprint, and you can install an Alea.cuBase license.

STEP 1: Create VPC

Login into your AWS console, click “VPC”. It will bring you to the VPC dashboard. If there are no VPC created, there will be a button “Get started creating a VPC” in your dashboard. Just click it, and a VPC configuration selection window will popup:

It provides 4 typical network topologies. In this example, I choose the first one, which is the simplest one.

Click “Continue” to do the network settings. We need set a proper availability zone for the subnet, because some zones don’t support GPU. In our example we choose “us-east-1a”:

Click “Create VPC”. The system will create a set of objects: 1 VPC, 1 Subnet, 1 Internet Gateway, 1 Network ACL, 2 Route Tables, and 1 Security Group. We keep all default settings, except for the security group.

For the security group we need to modify it so that it allows the Remote Desktop Protocol (RDP), so that we can connect to it. Navigate to “Security Groups” in the VPC console. We have to add one Inbound rule for the RDP protocol. Click on the drop down list to select the RDP protocol. Then add this rule and apply the changes as follows:


We have created the VPC. Go back to the main console.

STEP 2: Allocate EIP

In order to connect to your EC2 machine from the outside, we need to allocate one elastic IP (EIP). Go back to the main console, and select “EC2″, which will bring us to the EC2 console. On the left, we can navigate to “Elastic IPs”, and click “Allocate New Address”. This will popup a dialog where we can choose the purpose of the EIP. Set it to be used in VPC:


STEP 3: Create ENI

EIP is just a resource. We need to create an ENI and attach that EIP to it. On the left, navigate to “Network Interfaces”, and click “Create Network Interface”. In the creation dialog select the subnet to the one that VPC created:


We have created an ENI, but it has only a private IP address. We need to attach the EIP to it. Right click the ENI that we have created and a context menu will popup, choose “Associate Address”. A dialog will popup to let you select which IP you want to associate with it. Select the EIP that we just created:


STEP 4: Start Instance

Now have created all necessary objects and we can launch an EC2 instance. Navigate to “Instance” and click “Launch Instance”, choose “Classic Wizard”, then select proper AMI:


On the next page, the instance type should be “CG1 Cluster GPU” in order to get a GPU machine. We need to set it to be launched in the VPC we have created:


On the next page we need to select the network interface to the one we just created:


We also have to select the security group to be the one we just created:


After clicking “Launch”, it will take some time (10 to 30 minutes) to start the machine.

STEP 5: Install license and test

Now, you can connect to the instance via RDP. Install Alea.cuBase and use License Manager to install a license:


It is strongly recommended that you save your license once it is authenticated.

We run an example script to verify the setup:


If no evaluation window pops up the license is correctly installed. This license is bound to the ENI. This means you should keep the ENI as long as you want to use the license. If you changed the hardware configuration, you have to re-authenticate your license again.