Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 3b5bd5e

Browse files
committed
placement group, availability zone and p3dn.24xlarge support
1 parent 4a9037d commit 3b5bd5e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

cfn-template/deeplearning.template

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
3333
"Type" : "String"
3434
},
35+
"MyAvailabilityZone" : {
36+
"Description" : "My availability zone, e.g. us-east-1d",
37+
"AllowedPattern": "[a-z]+-[a-z]+-[1-9]{1}[a-z]{1}",
38+
"Type" : "String"
39+
},
3540
"PublicSubnetCIDR" : {
3641
"Default": "192.168.0.0/27",
3742
"Description" : "Public Subnet CIDR in MyVpcCIDR",
@@ -69,14 +74,15 @@
6974
"InstanceType" : {
7075
"Description" : "The EC2 instance type for workers. For latest GPUs choose p3.xx",
7176
"Type" : "String",
72-
"Default" : "p3.16xlarge",
77+
"Default" : "p3dn.24xlarge",
7378
"AllowedValues" : [
7479
"p2.16xlarge",
7580
"p2.8xlarge",
7681
"p2.xlarge",
7782
"p3.2xlarge",
7883
"p3.8xlarge",
7984
"p3.16xlarge",
85+
"p3dn.24xlarge",
8086
"g2.8xlarge",
8187
"g2.2xlarge",
8288
"t2.small",
@@ -236,6 +242,12 @@
236242
}
237243
},
238244
"Resources" : {
245+
"ResourcePlacementGroup": {
246+
"Type" : "AWS::EC2::PlacementGroup",
247+
"Properties" : {
248+
"Strategy" : "cluster"
249+
}
250+
},
239251
"ResourceMetadataLambdaFunction": {
240252
"Type": "AWS::Lambda::Function",
241253
"DependsOn" : ["MasterQueue"],
@@ -851,6 +863,9 @@
851863
"DesiredCapacity" : "1",
852864
"MinSize" : "1",
853865
"MaxSize" : "1",
866+
"PlacementGroup": {
867+
"Ref": "ResourcePlacementGroup"
868+
},
854869
"LaunchConfigurationName" : { "Ref" : "MasterLaunchConfig"},
855870
"VPCZoneIdentifier" : [{ "Ref" : "PublicSubnet"}],
856871
"NotificationConfiguration" : {
@@ -884,6 +899,9 @@
884899
"Properties" : {
885900
"MinSize" : "0",
886901
"MaxSize" : { "Ref" : "WorkerCount" },
902+
"PlacementGroup": {
903+
"Ref": "ResourcePlacementGroup"
904+
},
887905
"DesiredCapacity" : { "Ref" : "WorkerCount" },
888906
"LaunchConfigurationName" : {
889907
"Ref" : "WorkerLaunchConfig"
@@ -1002,6 +1020,7 @@
10021020
"Properties" : {
10031021
"VpcId" : { "Ref" : "Vpc" },
10041022
"CidrBlock" : { "Ref" : "PrivateSubnetCIDR"},
1023+
"AvailabilityZone": { "Ref": "MyAvailabilityZone"},
10051024
"Tags" : [
10061025
{ "Key" : "Network", "Value" : "Private" },
10071026
{ "Key" : "Name", "Value" : { "Ref" : "AWS::StackName" }}

0 commit comments

Comments
 (0)