Skip to content

Commit 14d1af5

Browse files
committed
Format file, change ami-naming to match existing AMI
1 parent 7c1a513 commit 14d1af5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

infrastructure/ami/hcl2-files/build.pkr.hcl

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ build {
1717
inline = ["echo 'source /opt/aws_neuron_venv_pytorch/bin/activate' >> /home/ubuntu/.bashrc"]
1818
}
1919
provisioner "file" {
20-
source = "scripts/welcome-msg.sh"
20+
source = "scripts/welcome-msg.sh"
2121
destination = "/tmp/99-custom-message"
2222
}
2323
provisioner "shell" {
2424
inline = [
25-
"sudo mv /tmp/99-custom-message /etc/update-motd.d/",
26-
"sudo chmod +x /etc/update-motd.d/99-custom-message",
27-
]
25+
"sudo mv /tmp/99-custom-message /etc/update-motd.d/",
26+
"sudo chmod +x /etc/update-motd.d/99-custom-message",
27+
]
2828
}
2929
}

infrastructure/ami/hcl2-files/sources.pkr.hcl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
source "amazon-ebs" "ubuntu" {
2-
ami_name = "huggingface-neuron-dl-ami-ubuntu-20.04_{{timestamp}}"
2+
ami_name = "huggingface-neuron-{{isotime \"2006-01-02T15-04-05Z\"}}"
33
instance_type = var.instance_type
44
region = var.region
55
source_ami = var.source_ami
66
ssh_username = var.ssh_username
77
launch_block_device_mappings {
88
device_name = "/dev/sda1"
9-
// encrypted = true
109
volume_size = 512
1110
volume_type = "gp2"
1211
delete_on_termination = true

0 commit comments

Comments
 (0)