From 0d6425e7eb4b3d04e46c9f5aa2d471064e921bff Mon Sep 17 00:00:00 2001 From: Alvaro Moran Date: Thu, 6 Feb 2025 14:57:22 +0100 Subject: [PATCH] chore(ami): set env variable to enalbe hf transfer This triggers faster download/upload speeds when dealing with the hub. --- infrastructure/ami/hcl2-files/build.pkr.hcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/ami/hcl2-files/build.pkr.hcl b/infrastructure/ami/hcl2-files/build.pkr.hcl index cda8df5bd..5a155f08b 100644 --- a/infrastructure/ami/hcl2-files/build.pkr.hcl +++ b/infrastructure/ami/hcl2-files/build.pkr.hcl @@ -14,7 +14,10 @@ build { ] } provisioner "shell" { - inline = ["echo 'source /opt/aws_neuronx_venv_pytorch/bin/activate' | sudo tee -a /home/ubuntu/.bashrc"] + inline = [ + "echo 'export HF_HUB_ENABLE_HF_TRANSFER=1' | sudo tee -a /home/ubuntu/.bashrc", + "echo 'source /opt/aws_neuronx_venv_pytorch/bin/activate' | sudo tee -a /home/ubuntu/.bashrc" + ] } provisioner "file" { source = "scripts/welcome-msg.sh"