Difference between revisions of "Dynamo in Amazon EC2"

From Dynamo
Jump to navigation Jump to search
Line 22: Line 22:
 
[[ File:Ec2CUDAAMI.png  |thumb|center|500px|Launch an instance]]
 
[[ File:Ec2CUDAAMI.png  |thumb|center|500px|Launch an instance]]
  
 +
==== Instance type ====
  
==== Instance type ====
+
Make certain that you initiate an instance type that includes a GPU machine.  Amzon describes [[https://aws.amazon.com/ec2/instance-types/ here]] its different instance types... please make certain that you check the prizing scheme before launching the instance.
 +
 
 +
[[ File:Ec2ChooseGPUInstance.png  |thumb|center|500px|Launch an instance]]
 +
 
 +
For some of the instance types you might need to contact Amazon: the default profile user usually cannot ask for a <tt>p2.large</tt> or an <tt>g2.large</tt> instance. You';ll probably need to apply for permission for launching them using your user support menu. This might take one or two days.
  
Make certain that you initiate an instance types that includes a GPU machine.
+
Also, take into account that not all areas provide all types of instances. You might need to change your geographic area in order to access GPU instances.
  
 
==== Storage  ====
 
==== Storage  ====
  
 
Make certain that your instance has at least 16Gb of storage capacity. The default of 8G is mainly consumed by the OS, and in the remaining size you will not be able to download and untar the ''Dynamo'' package.
 
Make certain that your instance has at least 16Gb of storage capacity. The default of 8G is mainly consumed by the OS, and in the remaining size you will not be able to download and untar the ''Dynamo'' package.
 +
 +
[[ File:AddStorageMain.png |thumb|center|500px|Selecting adequate storage]]
  
 
=== Launching an instance ===
 
=== Launching an instance ===

Revision as of 12:45, 21 September 2017

We are preparing a release of Dynamo for the EC2 cloud computing service. This will allow users without access to a graphic accelerator to use Dynamo on a powerful GPU in the cloud, paying only for the actually used computing time, and avoid the purchase, installation and maintenance of special hardware.

The Dynamo AMI itself can be used free of charge and needs no additional license. It delivers a tested installation of all needed software (Dynamo, CUDA, MCR libraries), ready for immediate use upon connection to your account.

Feel free to contact us if you want to be a beta tester.

Creating an account

We will post here a walkthrough for the creation of an user account in the Amazon EC2.

selecting the EC2 services

The EC2 dashboard is accessed through Services > EC2"

The EC2 dashboard

Configuring an instance

Launch an instance


Your instance will be built on the top of an AMI of type CUDA7.5 provided by NIVIDA. You can find it in the Amazon Marketplace. The use of the AMI itself is free of charge: you will only have to pay to Amazon the time you keep the instance running.

Launch an instance

Instance type

Make certain that you initiate an instance type that includes a GPU machine. Amzon describes [here] its different instance types... please make certain that you check the prizing scheme before launching the instance.

Launch an instance

For some of the instance types you might need to contact Amazon: the default profile user usually cannot ask for a p2.large or an g2.large instance. You';ll probably need to apply for permission for launching them using your user support menu. This might take one or two days.

Also, take into account that not all areas provide all types of instances. You might need to change your geographic area in order to access GPU instances.

Storage

Make certain that your instance has at least 16Gb of storage capacity. The default of 8G is mainly consumed by the OS, and in the remaining size you will not be able to download and untar the Dynamo package.

Selecting adequate storage

Launching an instance

Information after launching of the instance

The bottom of the popup window tells you how to connect to the instance on later point. However, the information is not totally correct, as the user name you need to use is ec2-user. This information can be consulted [in the documentation provided by Amazon]

Connecting to the instance

Once your instance is running, you can connect to it through an ssh terminal. Typically, you need to include the key file generated in the moment of launching the instance. Remember that you 'need to ensurer that your key is not publicly viewable through chmod

chmod 400 myKey.pem

Then you can connect to your instance of the NVIDIA AMI

ssh -i "myKey.pem"  ec2-user@<instance public DNS> 

Here, the instance location should look something like ec2-52-214-203-126.eu-west-1.compute.amazonaws.com

After you connect to it, you can check that the nvidia driver is in place by typing

nvidia-smi. 

You can also find the libraries

Running Dynamo projects

Copying Dynamo

In your local machine:

scp -i "keyFile.pem" <your Dynamo tar> <your amazon instance>:/home/ubuntu/

Setting the terminal

Then, you can ssh to your EC2 terminal. There, you still need to operate a couple of adjustments:

mkdir dynamo
tar -xf <Dynamo tar file> -C /home/ubuntu/dynamo 

You need to make an extra couple of adjustments on your terminal. The AMI provided by envidia needs to be able to talk to the Matlab libraries provided by your Dynamo tar.

sudo yum install -y libXt 

Now you are ready to go. This terminal will be able to run Dynamo projects in the usual way. We suggest you to test the installation by opening the command line of Dynamo:

dynamo

and then creating a synthetic project

Dynamo >  dtutorial mytest -p pgpu 

Then we adapt it for running in the GPU

Dynamo >  dvput pgpu dst standalone_gpu 

After that, we execute from the command line of the terminal (outside of the Dynamo prompt Dynamo > )

./pgpu.exe

Graphic output

Note that further settings are needed: :

sudo yum install -y libGLU
sudo yum install -y libXrand

This will merely prepare your system to talk to the graphical libraries delivered by Dynamo. Still you need to prepare a X forwarding protocol between your local machine and your Amazon terminal.