From 07a565eceb43c2d418d4a254fa632276382f055f Mon Sep 17 00:00:00 2001 From: Everett Berry Date: Thu, 7 Mar 2024 15:33:45 -0500 Subject: [PATCH] account for gpu capacity blocks --- ec2.py | 4 ++++ in/instance-type.html.mako | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ec2.py b/ec2.py index dc58574..91d408b 100644 --- a/ec2.py +++ b/ec2.py @@ -181,6 +181,10 @@ def add_pricing(imap): if region.startswith("cn-"): continue + # Skip capacity block pricing which affects certain p series instances + if product_attributes["marketoption"] == "CapacityBlock": + continue + terms = offer.get("terms") operating_system = product_attributes.get("operatingSystem") diff --git a/in/instance-type.html.mako b/in/instance-type.html.mako index eeae30f..2eeb357 100644 --- a/in/instance-type.html.mako +++ b/in/instance-type.html.mako @@ -99,6 +99,14 @@ + % if i["Amazon"][1]["value"] == 'p5.48xlarge' or i["Amazon"][1]["value"] == 'p4d.24xlarge': +
+
+

This instance is available in Capacity Blocks.

+
+
+ % endif +