-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add al2p2gpu build recipe to build gpu amis for p2 instances
- Loading branch information
1 parent
f8e9d67
commit 68516ea
Showing
5 changed files
with
75 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
locals { | ||
ami_name_al2p2gpu = "${var.ami_name_prefix_al2}-p2-gpu-hvm-2.0.${var.ami_version}-x86_64-ebs" | ||
} | ||
|
||
source "amazon-ebs" "al2p2gpu" { | ||
ami_name = "${local.ami_name_al2p2gpu}" | ||
ami_description = "Amazon Linux AMI 2.0.${var.ami_version} x86_64 ECS HVM GP2" | ||
instance_type = var.gpu_instance_types[0] | ||
launch_block_device_mappings { | ||
volume_size = var.block_device_size_gb | ||
delete_on_termination = true | ||
volume_type = "gp2" | ||
device_name = "/dev/xvda" | ||
} | ||
region = var.region | ||
source_ami_filter { | ||
filters = { | ||
name = "${var.source_ami_al2}" | ||
} | ||
owners = ["amazon"] | ||
most_recent = true | ||
} | ||
ssh_interface = "public_ip" | ||
ssh_username = "ec2-user" | ||
tags = { | ||
os_version = "Amazon Linux 2" | ||
source_image_name = "{{ .SourceAMIName }}" | ||
ecs_runtime_version = "Docker version ${var.docker_version}" | ||
ecs_agent_version = "${var.ecs_agent_version}" | ||
ami_type = "al2p2gpu" | ||
ami_version = "2.0.${var.ami_version}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters