Skip to content

Commit f149f83

Browse files
authored
Remove hardcoded cudo regions (#2493)
1 parent afed59f commit f149f83

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/dstack/_internal/core/backends/cudo/compute.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@ def get_offers(
4141
) -> List[InstanceOfferWithAvailability]:
4242
offers = get_catalog_offers(
4343
backend=BackendType.CUDO,
44+
locations=self.config.regions,
4445
requirements=requirements,
4546
)
4647
offers = [
4748
InstanceOfferWithAvailability(
4849
**offer.dict(), availability=InstanceAvailability.AVAILABLE
4950
)
5051
for offer in offers
52+
# in-hyderabad-1 is known to have provisioning issues
5153
if offer.region not in ["in-hyderabad-1"]
5254
]
5355
return offers

src/dstack/_internal/core/backends/cudo/configurator.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@
1717
)
1818
from dstack._internal.core.models.backends.base import BackendType
1919

20-
REGIONS = [
21-
"no-luster-1",
22-
"se-smedjebacken-1",
23-
"gb-london-1",
24-
"se-stockholm-1",
25-
"us-newyork-1",
26-
"us-santaclara-1",
27-
]
28-
29-
DEFAULT_REGION = "no-luster-1"
30-
3120

3221
class CudoConfigurator(Configurator):
3322
TYPE = BackendType.CUDO
@@ -39,8 +28,6 @@ def validate_config(self, config: CudoBackendConfigWithCreds, default_creds_enab
3928
def create_backend(
4029
self, project_name: str, config: CudoBackendConfigWithCreds
4130
) -> BackendRecord:
42-
if config.regions is None:
43-
config.regions = REGIONS
4431
return BackendRecord(
4532
config=CudoStoredConfig(
4633
**CudoBackendConfig.__response__.parse_obj(config).dict()

0 commit comments

Comments
 (0)