From 737f25858d481f15bdfcab239f8120dda0888c53 Mon Sep 17 00:00:00 2001 From: Jvst Me Date: Sat, 23 May 2026 00:07:56 +0200 Subject: [PATCH] Discover and use the latest AWS Ubuntu 22.04 DLAMI Automatically use the latest build, so that customers can benefit from the latest security patches without setting `os_images` or waiting for the dstack team to update the default AMI. Still, only use Ubuntu 22.04 to avoid breaking changes. Implementation: fetch the details of all Ubuntu 22.04 DLAMI builds (119 as of today), find the most recent in runtime. --- src/dstack/_internal/core/backends/aws/resources.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dstack/_internal/core/backends/aws/resources.py b/src/dstack/_internal/core/backends/aws/resources.py index 7b53606a2..48c32375e 100644 --- a/src/dstack/_internal/core/backends/aws/resources.py +++ b/src/dstack/_internal/core/backends/aws/resources.py @@ -32,8 +32,7 @@ def get_image_id_and_username( image_owner = image.owner username = image.user elif _supported_by_dlami(instance_type): - # TODO: Update DLAMI image version from time to time - image_name = "Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04) 20250516" + image_name = "Deep Learning Base OSS Nvidia Driver GPU AMI (Ubuntu 22.04) *" image_owner = DLAMI_OWNER_ACCOUNT_ID username = "ubuntu" else: