-
Notifications
You must be signed in to change notification settings - Fork 10
Finding Deep Learning AMI
This page documents how to find ami-id for the Amazon Deep Learning AMI if the existing one in the CloudFormation template file needs to be changed.
Finding the AMI old way
CDeep3M uses this AMI as the starting point:
Deep Learning AMI with Source Code (CUDA 9, Ubuntu)
To find it via aws cli:
aws ec2 describe-images --owners 898082745236 --filters "Name=name,Values=Deep Learning AMI with Source Code v2.0"
To figure out owner id above calling this on an ami image id got the info needed:
# command below is for ami in us-west-2 aka oregon
aws ec2 describe-images --image-id ami-bcce6ac4
The problem with the above approach is each region needs to be queried for the AMI and then converted to the format needed for CloudFormation templates.
Finding AMI via script
The following script requires Python 2.7+ and Python aws cli to be installed with credentials already configured.
Run the following (assuming one has cloned CDeep3M repo and changed into the base directory):
cd aws
./get_updated_ami_mappings.py
The important part of output:
"ap-south-1" {"AMI" : "ami-6a024a05"},
"eu-west-1" {"AMI" : "ami-2e269e57"},
"ap-northeast-2" {"AMI" : "ami-3097315e"},
"ap-northeast-1" {"AMI" : "ami-fff07199"},
"ap-southeast-1" {"AMI" : "ami-0746217b"},
"ap-southeast-2" {"AMI" : "ami-fbfe0999"},
"eu-central-1" {"AMI" : "ami-540f863b"},
"us-east-1" {"AMI" : "ami-c4701dbe"},
"us-east-2" {"AMI" : "ami-67dbf202"},
"us-west-2" {"AMI" : "ami-bcce6ac4"},
The above output is a mapping of regions to AMI image and can be put into the CloudFormation template.