by Rudolf Bumm (KSGR), Qing Liu (AWS), Steve Pieper (Isomics), Gang Fu (AWS)
Benefits
- Setup a powerful 3D Slicer instance on AWS Cloud
- Have different servers for each project
- Let coworkers remotely log on to that servers
- Share your 3D Slicer results from that server via the S3 bucket or your own 3dviewer.net instance
- Up- or downscale your machine according to the required GPU power
- Access your EC2 machine with low-cost hardware, even tablets
- Switch off (pause), and finally, delete the instance if you do not need it and only pay for what you use
Things to consider
We will be running a Windows EC2 instance.
Small EC2 Windows instances without GPU support can be created and run nearly free of charge on AWS. You could use an instance type “t2.small”.
At least EC2 “g” instance types (with GPU support) will be needed to work with 3D Slicer and deep learning tools. All our testing has been on a “g5.xlarge”.
For more information about GPU options see the Amazon Deep Learning GPU Guide.
Important note: You may be running into “limit” errors when you create and run your EC2 instance with GPU, because your Amazon account may need to get enabled for using a GPU first. The first step to increase your GPU instance quota is to request an instance using the steps below, and then if it’s denied follow the instructuctions to request a quota increase. If you have an institutional email account (company or university) it may be easier to get a quota increase compared to a generic gmail or yahoo type of email account.
The approximate cost of an EC2 instance with NVIDIA A10G support is around 1-2 $ per hour.
The CloudFormation template will automatically perform the following tasks when you create the EC2 instance:
- Install the latest NVIDIA drivers
- Install git
- Install MONAILabel
- Install TotalSegmentator
- Install lungmask
- Download the 3D Slicer stable installer
- Install Firefox
- Install and connect an S3 bucket
Go to the Amazon Console
https://aws.amazon.com/de/console/
and go to login page
||
|-|
Log into the AWS console, select the region you’d like to use
||
|-|
In the search bar, type cloudformation, and select CloudFormation service
||
|-|
- In the CloudFormation console, click Create stack
||
|-|
||
|-|
- Enter a few parameters for the stack
- Enter a name for this stack you are deploying, e.g. MONAI-Stack
- Select the instance type you’d like to use, e.g. g5.xlarge
- You can enter a name for the EC2 instance, or leave the default value
- Set the IP address of the machine that you will use to connect to the EC2 instance. To find out your IP address, you can visit https://checkip.amazonaws.com if your IP address is 1.2.3.4, please enter 1.2.3.4/32 as the parameter. Note: This is a security measure so that the machine can only be reached from the IP address of the client machine you are currently using. Standard AWS networking tools can be used to add other IP addresses for access after the instance is created.
The screen should look similar to this:
||
|-|
- Click Next
- Accept default settings and click Next
- On the summary page, check I acknowledge that AWS CloudFormation might create IAM resources., and click
- Submit
- Status: “CREATE_IN_PROGRESS”. It should take 15 ~ 20 mins for the stack to get deployed
||
|-|
Step 2. Connect to the environment
1. After the stack is deployed successfully, select the stack in CloudFormation console and then select Outputs tab
||
|-|
- Set your login password. In the Outputs tab, open the SSMsessionManager link in a new browser tab
- In the new browser tab (Windows Powershell session), type net user administrator my-strong-password,
- please change my-strong-password to your own password, and hit Enter
- Go back to the Outputs tab, open DCVwebConsole link in a new browser tab (accepts the security warning)
||
|-|
- In the NICE DCV login screen, enter administrator as the Username, and the previously set password as Password
- You should be able to log into the Windows EC2 instance
||
|-|
speedtest.net on g5.xlarge:
||
|-|
Steam EZbench on g5.xlarge:
||
|-|
Step 3. Delete the environment
- When the environment is no longer needed, you can delete all deployed resources.
- Go to the CloudFormation console, select the deployed stack, and then click Delete
||
|-|