skypilot-nightly 1.0.0.dev20250602__py3-none-any.whl → 1.0.0.dev20250604__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sky/__init__.py +3 -3
- sky/adaptors/kubernetes.py +8 -0
- sky/backends/backend_utils.py +1 -0
- sky/backends/cloud_vm_ray_backend.py +8 -4
- sky/{clouds/service_catalog → catalog}/__init__.py +6 -17
- sky/{clouds/service_catalog → catalog}/aws_catalog.py +3 -3
- sky/{clouds/service_catalog → catalog}/azure_catalog.py +2 -2
- sky/{clouds/service_catalog → catalog}/common.py +10 -8
- sky/{clouds/service_catalog → catalog}/cudo_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/data_fetchers/analyze.py +1 -1
- sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_aws.py +1 -1
- sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vsphere.py +1 -1
- sky/{clouds/service_catalog → catalog}/do_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/fluidstack_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/gcp_catalog.py +2 -2
- sky/{clouds/service_catalog → catalog}/ibm_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/kubernetes_catalog.py +2 -2
- sky/{clouds/service_catalog → catalog}/lambda_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/nebius_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/oci_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/paperspace_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/runpod_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/scp_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/ssh_catalog.py +3 -3
- sky/{clouds/service_catalog → catalog}/vast_catalog.py +1 -1
- sky/{clouds/service_catalog → catalog}/vsphere_catalog.py +1 -1
- sky/cli.py +7 -6
- sky/client/cli.py +7 -6
- sky/client/sdk.py +3 -4
- sky/clouds/aws.py +41 -40
- sky/clouds/azure.py +31 -34
- sky/clouds/cloud.py +8 -8
- sky/clouds/cudo.py +26 -26
- sky/clouds/do.py +24 -24
- sky/clouds/fluidstack.py +27 -29
- sky/clouds/gcp.py +45 -48
- sky/clouds/ibm.py +26 -26
- sky/clouds/kubernetes.py +24 -12
- sky/clouds/lambda_cloud.py +28 -30
- sky/clouds/nebius.py +26 -28
- sky/clouds/oci.py +32 -32
- sky/clouds/paperspace.py +24 -26
- sky/clouds/runpod.py +26 -28
- sky/clouds/scp.py +37 -36
- sky/clouds/utils/gcp_utils.py +3 -2
- sky/clouds/vast.py +27 -27
- sky/clouds/vsphere.py +12 -15
- sky/core.py +2 -2
- sky/dashboard/out/404.html +1 -1
- sky/dashboard/out/_next/static/chunks/236-fef38aa6e5639300.js +6 -0
- sky/dashboard/out/_next/static/chunks/37-947904ccc5687bac.js +6 -0
- sky/dashboard/out/_next/static/chunks/682-2be9b0f169727f2f.js +6 -0
- sky/dashboard/out/_next/static/chunks/856-f1b1f7f47edde2e8.js +1 -0
- sky/dashboard/out/_next/static/chunks/969-d7b6fb7f602bfcb3.js +1 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-158b70da336d8607.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-62c9982dc3675725.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/{clusters-f37ff20f0af29aae.js → clusters-5549a350f97d7ef3.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/config-35383adcb0edb5e2.js +6 -0
- sky/dashboard/out/_next/static/chunks/pages/infra/{[context]-342bc15bb78ab2e5.js → [context]-b68ddeed712d45b5.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{infra-7b4b8e7fa9fa0827.js → infra-13b117a831702196.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-a62a3c65dc9bc57c.js +11 -0
- sky/dashboard/out/_next/static/chunks/pages/{jobs-78a6c5ba3e24c0cf.js → jobs-a76b2700eca236f7.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/{users-89f9212b81d8897e.js → users-07b523ccb19317ad.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspace/{new-198b6e00d7d724c5.js → new-c7516f2b4c3727c0.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces/{[name]-2ce792183b03c341.js → [name]-7799de9e691e35d8.js} +1 -1
- sky/dashboard/out/_next/static/chunks/pages/workspaces-f54921ec9eb20965.js +1 -0
- sky/dashboard/out/_next/static/css/63d3995d8b528eb1.css +3 -0
- sky/dashboard/out/_next/static/vWwfD3jOky5J5jULHp8JT/_buildManifest.js +1 -0
- sky/dashboard/out/clusters/[cluster]/[job].html +1 -1
- sky/dashboard/out/clusters/[cluster].html +1 -1
- sky/dashboard/out/clusters.html +1 -1
- sky/dashboard/out/config.html +1 -1
- sky/dashboard/out/index.html +1 -1
- sky/dashboard/out/infra/[context].html +1 -1
- sky/dashboard/out/infra.html +1 -1
- sky/dashboard/out/jobs/[job].html +1 -1
- sky/dashboard/out/jobs.html +1 -1
- sky/dashboard/out/users.html +1 -1
- sky/dashboard/out/workspace/new.html +1 -1
- sky/dashboard/out/workspaces/[name].html +1 -1
- sky/dashboard/out/workspaces.html +1 -1
- sky/data/storage_utils.py +5 -2
- sky/execution.py +1 -2
- sky/global_user_state.py +2 -4
- sky/jobs/server/core.py +1 -1
- sky/jobs/utils.py +31 -1
- sky/optimizer.py +1 -1
- sky/provision/cudo/cudo_machine_type.py +1 -1
- sky/provision/gcp/constants.py +4 -0
- sky/provision/kubernetes/utils.py +35 -22
- sky/provision/vast/utils.py +1 -1
- sky/provision/vsphere/common/vim_utils.py +1 -2
- sky/provision/vsphere/instance.py +1 -1
- sky/provision/vsphere/vsphere_utils.py +7 -11
- sky/resources.py +33 -2
- sky/serve/server/core.py +1 -1
- sky/server/common.py +86 -53
- sky/server/constants.py +1 -1
- sky/server/requests/executor.py +4 -1
- sky/server/requests/payloads.py +16 -0
- sky/server/requests/serializers/decoders.py +1 -1
- sky/server/server.py +3 -3
- sky/skypilot_config.py +88 -37
- sky/usage/usage_lib.py +4 -3
- sky/utils/accelerator_registry.py +3 -3
- sky/utils/controller_utils.py +4 -14
- sky/utils/kubernetes/deploy_remote_cluster.py +2 -1
- sky/utils/schemas.py +6 -9
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/RECORD +127 -126
- sky/dashboard/out/_next/static/chunks/236-7458fda7b295f305.js +0 -6
- sky/dashboard/out/_next/static/chunks/37-b638675d511d58b4.js +0 -6
- sky/dashboard/out/_next/static/chunks/682-5c12535476a21ce3.js +0 -6
- sky/dashboard/out/_next/static/chunks/856-ab9627e7e8ac35e8.js +0 -1
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]/[job]-8f270e2c9c59fa1a.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/clusters/[cluster]-25edb867a41b6b20.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/config-3c6a2dabf56e8cd6.js +0 -6
- sky/dashboard/out/_next/static/chunks/pages/jobs/[job]-c0c1dff3cd463d9e.js +0 -11
- sky/dashboard/out/_next/static/chunks/pages/workspaces-17d41826537196e7.js +0 -1
- sky/dashboard/out/_next/static/css/2b3ee34e586949a3.css +0 -3
- sky/dashboard/out/_next/static/dev-ndwjPgd_uQ4dcXXiv/_buildManifest.js +0 -1
- /sky/{clouds/service_catalog → catalog}/config.py +0 -0
- /sky/{clouds/service_catalog → catalog}/constants.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/__init__.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_azure.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_cudo.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_fluidstack.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_gcp.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_ibm.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_lambda_cloud.py +0 -0
- /sky/{clouds/service_catalog → catalog}/data_fetchers/fetch_vast.py +0 -0
- /sky/dashboard/out/_next/static/chunks/{843-786c36624d5ff61f.js → 843-a097338acb89b7d7.js} +0 -0
- /sky/dashboard/out/_next/static/chunks/pages/{_app-ad1edd7fe17ea796.js → _app-67925f5e6382e22f.js} +0 -0
- /sky/dashboard/out/_next/static/{dev-ndwjPgd_uQ4dcXXiv → vWwfD3jOky5J5jULHp8JT}/_ssgManifest.js +0 -0
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/licenses/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250602.dist-info → skypilot_nightly-1.0.0.dev20250604.dist-info}/top_level.txt +0 -0
sky/clouds/aws.py
CHANGED
@@ -10,14 +10,14 @@ import time
|
|
10
10
|
import typing
|
11
11
|
from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Union
|
12
12
|
|
13
|
+
from sky import catalog
|
13
14
|
from sky import clouds
|
14
15
|
from sky import exceptions
|
15
16
|
from sky import provision as provision_lib
|
16
17
|
from sky import sky_logging
|
17
18
|
from sky import skypilot_config
|
18
19
|
from sky.adaptors import aws
|
19
|
-
from sky.
|
20
|
-
from sky.clouds.service_catalog import common as catalog_common
|
20
|
+
from sky.catalog import common as catalog_common
|
21
21
|
from sky.clouds.utils import aws_utils
|
22
22
|
from sky.skylet import constants
|
23
23
|
from sky.utils import annotations
|
@@ -38,7 +38,7 @@ logger = sky_logging.init_logger(__name__)
|
|
38
38
|
# Image ID tags
|
39
39
|
_DEFAULT_CPU_IMAGE_ID = 'skypilot:custom-cpu-ubuntu'
|
40
40
|
# For GPU-related package version,
|
41
|
-
# see sky/
|
41
|
+
# see sky/catalog/images/provisioners/cuda.sh
|
42
42
|
_DEFAULT_GPU_IMAGE_ID = 'skypilot:custom-gpu-ubuntu'
|
43
43
|
_DEFAULT_GPU_K80_IMAGE_ID = 'skypilot:k80-ubuntu-2004'
|
44
44
|
_DEFAULT_NEURON_IMAGE_ID = 'skypilot:neuron-ubuntu-2204'
|
@@ -201,7 +201,7 @@ class AWS(clouds.Cloud):
|
|
201
201
|
use_spot: bool, region: Optional[str],
|
202
202
|
zone: Optional[str]) -> List[clouds.Region]:
|
203
203
|
del accelerators # unused
|
204
|
-
regions =
|
204
|
+
regions = catalog.get_region_zones_for_instance_type(
|
205
205
|
instance_type, use_spot, 'aws')
|
206
206
|
|
207
207
|
if region is not None:
|
@@ -256,19 +256,20 @@ class AWS(clouds.Cloud):
|
|
256
256
|
@classmethod
|
257
257
|
def _get_default_ami(cls, region_name: str, instance_type: str) -> str:
|
258
258
|
acc = cls.get_accelerators_from_instance_type(instance_type)
|
259
|
-
image_id =
|
260
|
-
|
261
|
-
|
259
|
+
image_id = catalog.get_image_id_from_tag(_DEFAULT_CPU_IMAGE_ID,
|
260
|
+
region_name,
|
261
|
+
clouds='aws')
|
262
262
|
if acc is not None:
|
263
|
-
image_id =
|
264
|
-
|
263
|
+
image_id = catalog.get_image_id_from_tag(_DEFAULT_GPU_IMAGE_ID,
|
264
|
+
region_name,
|
265
|
+
clouds='aws')
|
265
266
|
assert len(acc) == 1, acc
|
266
267
|
acc_name = list(acc.keys())[0]
|
267
268
|
if acc_name == 'K80':
|
268
|
-
image_id =
|
269
|
+
image_id = catalog.get_image_id_from_tag(
|
269
270
|
_DEFAULT_GPU_K80_IMAGE_ID, region_name, clouds='aws')
|
270
271
|
if acc_name in ['Trainium', 'Inferentia']:
|
271
|
-
image_id =
|
272
|
+
image_id = catalog.get_image_id_from_tag(
|
272
273
|
_DEFAULT_NEURON_IMAGE_ID, region_name, clouds='aws')
|
273
274
|
if image_id is not None:
|
274
275
|
return image_id
|
@@ -295,9 +296,9 @@ class AWS(clouds.Cloud):
|
|
295
296
|
assert region_name in image_id, image_id
|
296
297
|
image_id_str = image_id[region_name]
|
297
298
|
if image_id_str.startswith('skypilot:'):
|
298
|
-
image_id_str =
|
299
|
-
|
300
|
-
|
299
|
+
image_id_str = catalog.get_image_id_from_tag(image_id_str,
|
300
|
+
region_name,
|
301
|
+
clouds='aws')
|
301
302
|
if image_id_str is None:
|
302
303
|
# Raise ResourcesUnavailableError to make sure the failover
|
303
304
|
# in CloudVMRayBackend will be correctly triggered.
|
@@ -356,11 +357,11 @@ class AWS(clouds.Cloud):
|
|
356
357
|
use_spot: bool,
|
357
358
|
region: Optional[str] = None,
|
358
359
|
zone: Optional[str] = None) -> float:
|
359
|
-
return
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
360
|
+
return catalog.get_hourly_cost(instance_type,
|
361
|
+
use_spot=use_spot,
|
362
|
+
region=region,
|
363
|
+
zone=zone,
|
364
|
+
clouds='aws')
|
364
365
|
|
365
366
|
def accelerators_to_hourly_cost(self,
|
366
367
|
accelerators: Dict[str, int],
|
@@ -403,10 +404,10 @@ class AWS(clouds.Cloud):
|
|
403
404
|
memory: Optional[str] = None,
|
404
405
|
disk_tier: Optional[resources_utils.DiskTier] = None
|
405
406
|
) -> Optional[str]:
|
406
|
-
return
|
407
|
-
|
408
|
-
|
409
|
-
|
407
|
+
return catalog.get_default_instance_type(cpus=cpus,
|
408
|
+
memory=memory,
|
409
|
+
disk_tier=disk_tier,
|
410
|
+
clouds='aws')
|
410
411
|
|
411
412
|
# TODO: factor the following three methods, as they are the same logic
|
412
413
|
# between Azure and AWS.
|
@@ -415,16 +416,16 @@ class AWS(clouds.Cloud):
|
|
415
416
|
cls,
|
416
417
|
instance_type: str,
|
417
418
|
) -> Optional[Dict[str, Union[int, float]]]:
|
418
|
-
return
|
419
|
-
|
419
|
+
return catalog.get_accelerators_from_instance_type(instance_type,
|
420
|
+
clouds='aws')
|
420
421
|
|
421
422
|
@classmethod
|
422
423
|
def get_vcpus_mem_from_instance_type(
|
423
424
|
cls,
|
424
425
|
instance_type: str,
|
425
426
|
) -> Tuple[Optional[float], Optional[float]]:
|
426
|
-
return
|
427
|
-
|
427
|
+
return catalog.get_vcpus_mem_from_instance_type(instance_type,
|
428
|
+
clouds='aws')
|
428
429
|
|
429
430
|
def make_deploy_resources_variables(
|
430
431
|
self,
|
@@ -548,16 +549,16 @@ class AWS(clouds.Cloud):
|
|
548
549
|
|
549
550
|
assert len(accelerators) == 1, resources
|
550
551
|
acc, acc_count = list(accelerators.items())[0]
|
551
|
-
(instance_list,
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
552
|
+
(instance_list,
|
553
|
+
fuzzy_candidate_list) = catalog.get_instance_type_for_accelerator(
|
554
|
+
acc,
|
555
|
+
acc_count,
|
556
|
+
use_spot=resources.use_spot,
|
557
|
+
cpus=resources.cpus,
|
558
|
+
memory=resources.memory,
|
559
|
+
region=resources.region,
|
560
|
+
zone=resources.zone,
|
561
|
+
clouds='aws')
|
561
562
|
if instance_list is None:
|
562
563
|
return resources_utils.FeasibleResources([], fuzzy_candidate_list,
|
563
564
|
None)
|
@@ -671,7 +672,7 @@ class AWS(clouds.Cloud):
|
|
671
672
|
|
672
673
|
# Fetch the AWS catalogs
|
673
674
|
# pylint: disable=import-outside-toplevel
|
674
|
-
from sky.
|
675
|
+
from sky.catalog import aws_catalog
|
675
676
|
|
676
677
|
# Trigger the fetch of the availability zones mapping.
|
677
678
|
try:
|
@@ -924,7 +925,7 @@ class AWS(clouds.Cloud):
|
|
924
925
|
identity_type.can_credential_expire())
|
925
926
|
|
926
927
|
def instance_type_exists(self, instance_type):
|
927
|
-
return
|
928
|
+
return catalog.instance_type_exists(instance_type, clouds='aws')
|
928
929
|
|
929
930
|
@classmethod
|
930
931
|
def _get_disk_type(cls, disk_tier: resources_utils.DiskTier) -> str:
|
@@ -980,7 +981,7 @@ class AWS(clouds.Cloud):
|
|
980
981
|
use_spot = resources.use_spot
|
981
982
|
|
982
983
|
# pylint: disable=import-outside-toplevel,unused-import
|
983
|
-
from sky.
|
984
|
+
from sky.catalog import aws_catalog
|
984
985
|
|
985
986
|
quota_code = aws_catalog.get_quota_code(instance_type, use_spot)
|
986
987
|
|
sky/clouds/azure.py
CHANGED
@@ -9,12 +9,12 @@ from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
|
|
9
9
|
import colorama
|
10
10
|
from packaging import version as pversion
|
11
11
|
|
12
|
+
from sky import catalog
|
12
13
|
from sky import clouds
|
13
14
|
from sky import exceptions
|
14
15
|
from sky import sky_logging
|
15
16
|
from sky import skypilot_config
|
16
17
|
from sky.adaptors import azure
|
17
|
-
from sky.clouds import service_catalog
|
18
18
|
from sky.clouds.utils import azure_utils
|
19
19
|
from sky.utils import annotations
|
20
20
|
from sky.utils import common_utils
|
@@ -109,11 +109,11 @@ class Azure(clouds.Cloud):
|
|
109
109
|
use_spot: bool,
|
110
110
|
region: Optional[str] = None,
|
111
111
|
zone: Optional[str] = None) -> float:
|
112
|
-
return
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
112
|
+
return catalog.get_hourly_cost(instance_type,
|
113
|
+
use_spot=use_spot,
|
114
|
+
region=region,
|
115
|
+
zone=zone,
|
116
|
+
clouds='azure')
|
117
117
|
|
118
118
|
def accelerators_to_hourly_cost(self,
|
119
119
|
accelerators: Dict[str, int],
|
@@ -156,17 +156,16 @@ class Azure(clouds.Cloud):
|
|
156
156
|
memory: Optional[str] = None,
|
157
157
|
disk_tier: Optional[resources_utils.DiskTier] = None
|
158
158
|
) -> Optional[str]:
|
159
|
-
return
|
160
|
-
|
161
|
-
|
162
|
-
|
159
|
+
return catalog.get_default_instance_type(cpus=cpus,
|
160
|
+
memory=memory,
|
161
|
+
disk_tier=disk_tier,
|
162
|
+
clouds='azure')
|
163
163
|
|
164
164
|
@classmethod
|
165
165
|
def get_image_size(cls, image_id: str, region: Optional[str]) -> float:
|
166
166
|
# Process skypilot images.
|
167
167
|
if image_id.startswith('skypilot:'):
|
168
|
-
image_id =
|
169
|
-
clouds='azure')
|
168
|
+
image_id = catalog.get_image_id_from_tag(image_id, clouds='azure')
|
170
169
|
if image_id.startswith(_COMMUNITY_IMAGE_PREFIX):
|
171
170
|
# Avoid querying the image size from Azure as
|
172
171
|
# all skypilot custom images have the same size.
|
@@ -263,7 +262,7 @@ class Azure(clouds.Cloud):
|
|
263
262
|
zone: Optional[str]) -> List[clouds.Region]:
|
264
263
|
del accelerators # unused
|
265
264
|
assert zone is None, 'Azure does not support zones'
|
266
|
-
regions =
|
265
|
+
regions = catalog.get_region_zones_for_instance_type(
|
267
266
|
instance_type, use_spot, 'azure')
|
268
267
|
|
269
268
|
if region is not None:
|
@@ -298,16 +297,16 @@ class Azure(clouds.Cloud):
|
|
298
297
|
cls,
|
299
298
|
instance_type: str,
|
300
299
|
) -> Optional[Dict[str, Union[int, float]]]:
|
301
|
-
return
|
302
|
-
|
300
|
+
return catalog.get_accelerators_from_instance_type(instance_type,
|
301
|
+
clouds='azure')
|
303
302
|
|
304
303
|
@classmethod
|
305
304
|
def get_vcpus_mem_from_instance_type(
|
306
305
|
cls,
|
307
306
|
instance_type: str,
|
308
307
|
) -> Tuple[Optional[float], Optional[float]]:
|
309
|
-
return
|
310
|
-
|
308
|
+
return catalog.get_vcpus_mem_from_instance_type(instance_type,
|
309
|
+
clouds='azure')
|
311
310
|
|
312
311
|
@classmethod
|
313
312
|
def get_zone_shell_cmd(cls) -> Optional[str]:
|
@@ -338,7 +337,7 @@ class Azure(clouds.Cloud):
|
|
338
337
|
if (resources.image_id is None or
|
339
338
|
resources.extract_docker_image() is not None):
|
340
339
|
# pylint: disable=import-outside-toplevel
|
341
|
-
from sky.
|
340
|
+
from sky.catalog import azure_catalog
|
342
341
|
gen_version = azure_catalog.get_gen_version_from_instance_type(
|
343
342
|
resources.instance_type)
|
344
343
|
image_id = self._get_default_image_tag(gen_version,
|
@@ -352,8 +351,7 @@ class Azure(clouds.Cloud):
|
|
352
351
|
|
353
352
|
# Checked basic image syntax in resources.py
|
354
353
|
if image_id.startswith('skypilot:'):
|
355
|
-
image_id =
|
356
|
-
clouds='azure')
|
354
|
+
image_id = catalog.get_image_id_from_tag(image_id, clouds='azure')
|
357
355
|
# Fallback if image does not exist in the specified region.
|
358
356
|
# Putting fallback here instead of at image validation
|
359
357
|
# when creating the resource because community images are
|
@@ -364,8 +362,8 @@ class Azure(clouds.Cloud):
|
|
364
362
|
) and region_name not in azure_catalog.COMMUNITY_IMAGE_AVAILABLE_REGIONS:
|
365
363
|
logger.info(f'Azure image {image_id} does not exist in region '
|
366
364
|
f'{region_name} so use the fallback image instead.')
|
367
|
-
image_id =
|
368
|
-
|
365
|
+
image_id = catalog.get_image_id_from_tag(_FALLBACK_IMAGE_ID,
|
366
|
+
clouds='azure')
|
369
367
|
|
370
368
|
if image_id.startswith(_COMMUNITY_IMAGE_PREFIX):
|
371
369
|
image_config = {'community_gallery_image_id': image_id}
|
@@ -501,16 +499,16 @@ class Azure(clouds.Cloud):
|
|
501
499
|
|
502
500
|
assert len(accelerators) == 1, resources
|
503
501
|
acc, acc_count = list(accelerators.items())[0]
|
504
|
-
(instance_list,
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
502
|
+
(instance_list,
|
503
|
+
fuzzy_candidate_list) = catalog.get_instance_type_for_accelerator(
|
504
|
+
acc,
|
505
|
+
acc_count,
|
506
|
+
cpus=resources.cpus,
|
507
|
+
memory=resources.memory,
|
508
|
+
use_spot=resources.use_spot,
|
509
|
+
region=resources.region,
|
510
|
+
zone=resources.zone,
|
511
|
+
clouds='azure')
|
514
512
|
if instance_list is None:
|
515
513
|
return resources_utils.FeasibleResources([], fuzzy_candidate_list,
|
516
514
|
None)
|
@@ -591,8 +589,7 @@ class Azure(clouds.Cloud):
|
|
591
589
|
}
|
592
590
|
|
593
591
|
def instance_type_exists(self, instance_type):
|
594
|
-
return
|
595
|
-
clouds='azure')
|
592
|
+
return catalog.instance_type_exists(instance_type, clouds='azure')
|
596
593
|
|
597
594
|
@classmethod
|
598
595
|
@annotations.lru_cache(scope='global',
|
sky/clouds/cloud.py
CHANGED
@@ -16,9 +16,9 @@ from typing import (Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple,
|
|
16
16
|
|
17
17
|
from typing_extensions import assert_never
|
18
18
|
|
19
|
+
from sky import catalog
|
19
20
|
from sky import exceptions
|
20
21
|
from sky import skypilot_config
|
21
|
-
from sky.clouds import service_catalog
|
22
22
|
from sky.utils import log_utils
|
23
23
|
from sky.utils import resources_utils
|
24
24
|
from sky.utils import timeline
|
@@ -188,7 +188,7 @@ class Cloud:
|
|
188
188
|
"""Returns the regions that offer the specified resources.
|
189
189
|
|
190
190
|
The order of the regions follow the order of the regions returned by
|
191
|
-
|
191
|
+
sky/catalog/common.py#get_region_zones().
|
192
192
|
When region or zone is not None, the returned value will be limited to
|
193
193
|
the specified region/zone.
|
194
194
|
|
@@ -367,9 +367,9 @@ class Cloud:
|
|
367
367
|
@classmethod
|
368
368
|
def is_image_tag_valid(cls, image_tag: str, region: Optional[str]) -> bool:
|
369
369
|
"""Validates that the image tag is valid for this cloud."""
|
370
|
-
return
|
371
|
-
|
372
|
-
|
370
|
+
return catalog.is_image_tag_valid(image_tag,
|
371
|
+
region,
|
372
|
+
clouds=cls._REPR.lower())
|
373
373
|
|
374
374
|
@classmethod
|
375
375
|
def is_label_valid(cls, label_key: str,
|
@@ -625,9 +625,9 @@ class Cloud:
|
|
625
625
|
Raises:
|
626
626
|
ValueError: If region or zone is invalid or not supported.
|
627
627
|
"""
|
628
|
-
return
|
629
|
-
|
630
|
-
|
628
|
+
return catalog.validate_region_zone(region,
|
629
|
+
zone,
|
630
|
+
clouds=self._REPR.lower())
|
631
631
|
|
632
632
|
def need_cleanup_after_preemption_or_failure(
|
633
633
|
self, resources: 'resources_lib.Resources') -> bool:
|
sky/clouds/cudo.py
CHANGED
@@ -3,8 +3,8 @@ import subprocess
|
|
3
3
|
import typing
|
4
4
|
from typing import Dict, Iterator, List, Optional, Tuple, Union
|
5
5
|
|
6
|
+
from sky import catalog
|
6
7
|
from sky import clouds
|
7
|
-
from sky.clouds import service_catalog
|
8
8
|
from sky.utils import common_utils
|
9
9
|
from sky.utils import registry
|
10
10
|
from sky.utils import resources_utils
|
@@ -110,7 +110,7 @@ class Cudo(clouds.Cloud):
|
|
110
110
|
if use_spot:
|
111
111
|
return []
|
112
112
|
|
113
|
-
regions =
|
113
|
+
regions = catalog.get_region_zones_for_instance_type(
|
114
114
|
instance_type, use_spot, 'cudo')
|
115
115
|
|
116
116
|
if region is not None:
|
@@ -123,8 +123,8 @@ class Cudo(clouds.Cloud):
|
|
123
123
|
instance_type: str,
|
124
124
|
) -> Tuple[Optional[float], Optional[float]]:
|
125
125
|
|
126
|
-
return
|
127
|
-
|
126
|
+
return catalog.get_vcpus_mem_from_instance_type(instance_type,
|
127
|
+
clouds='cudo')
|
128
128
|
|
129
129
|
@classmethod
|
130
130
|
def zones_provision_loop(
|
@@ -151,11 +151,11 @@ class Cudo(clouds.Cloud):
|
|
151
151
|
use_spot: bool,
|
152
152
|
region: Optional[str] = None,
|
153
153
|
zone: Optional[str] = None) -> float:
|
154
|
-
return
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
154
|
+
return catalog.get_hourly_cost(instance_type,
|
155
|
+
use_spot=use_spot,
|
156
|
+
region=region,
|
157
|
+
zone=zone,
|
158
|
+
clouds='cudo')
|
159
159
|
|
160
160
|
def accelerators_to_hourly_cost(self,
|
161
161
|
accelerators: Dict[str, int],
|
@@ -177,17 +177,17 @@ class Cudo(clouds.Cloud):
|
|
177
177
|
memory: Optional[str] = None,
|
178
178
|
disk_tier: Optional[resources_utils.DiskTier] = None
|
179
179
|
) -> Optional[str]:
|
180
|
-
return
|
181
|
-
|
182
|
-
|
180
|
+
return catalog.get_default_instance_type(cpus=cpus,
|
181
|
+
memory=memory,
|
182
|
+
clouds='cudo')
|
183
183
|
|
184
184
|
@classmethod
|
185
185
|
def get_accelerators_from_instance_type(
|
186
186
|
cls,
|
187
187
|
instance_type: str,
|
188
188
|
) -> Optional[Dict[str, Union[int, float]]]:
|
189
|
-
return
|
190
|
-
|
189
|
+
return catalog.get_accelerators_from_instance_type(instance_type,
|
190
|
+
clouds='cudo')
|
191
191
|
|
192
192
|
@classmethod
|
193
193
|
def get_zone_shell_cmd(cls) -> Optional[str]:
|
@@ -255,16 +255,16 @@ class Cudo(clouds.Cloud):
|
|
255
255
|
|
256
256
|
assert len(accelerators) == 1, resources
|
257
257
|
acc, acc_count = list(accelerators.items())[0]
|
258
|
-
(instance_list,
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
258
|
+
(instance_list,
|
259
|
+
fuzzy_candidate_list) = catalog.get_instance_type_for_accelerator(
|
260
|
+
acc,
|
261
|
+
acc_count,
|
262
|
+
use_spot=resources.use_spot,
|
263
|
+
cpus=resources.cpus,
|
264
|
+
memory=resources.memory,
|
265
|
+
region=resources.region,
|
266
|
+
zone=resources.zone,
|
267
|
+
clouds='cudo')
|
268
268
|
if instance_list is None:
|
269
269
|
return resources_utils.FeasibleResources([], fuzzy_candidate_list,
|
270
270
|
None)
|
@@ -338,7 +338,7 @@ class Cudo(clouds.Cloud):
|
|
338
338
|
return None
|
339
339
|
|
340
340
|
def instance_type_exists(self, instance_type: str) -> bool:
|
341
|
-
return
|
341
|
+
return catalog.instance_type_exists(instance_type, 'cudo')
|
342
342
|
|
343
343
|
def validate_region_zone(self, region: Optional[str], zone: Optional[str]):
|
344
|
-
return
|
344
|
+
return catalog.validate_region_zone(region, zone, clouds='cudo')
|
sky/clouds/do.py
CHANGED
@@ -5,9 +5,9 @@ import os
|
|
5
5
|
import typing
|
6
6
|
from typing import Dict, Iterator, List, Optional, Tuple, Union
|
7
7
|
|
8
|
+
from sky import catalog
|
8
9
|
from sky import clouds
|
9
10
|
from sky.adaptors import do
|
10
|
-
from sky.clouds import service_catalog
|
11
11
|
from sky.provision.do import utils as do_utils
|
12
12
|
from sky.utils import registry
|
13
13
|
from sky.utils import resources_utils
|
@@ -84,7 +84,7 @@ class DO(clouds.Cloud):
|
|
84
84
|
del accelerators, zone # unused
|
85
85
|
if use_spot:
|
86
86
|
return []
|
87
|
-
regions =
|
87
|
+
regions = catalog.get_region_zones_for_instance_type(
|
88
88
|
instance_type, use_spot, 'DO')
|
89
89
|
if region is not None:
|
90
90
|
regions = [r for r in regions if r.name == region]
|
@@ -95,8 +95,8 @@ class DO(clouds.Cloud):
|
|
95
95
|
cls,
|
96
96
|
instance_type: str,
|
97
97
|
) -> Tuple[Optional[float], Optional[float]]:
|
98
|
-
return
|
99
|
-
|
98
|
+
return catalog.get_vcpus_mem_from_instance_type(instance_type,
|
99
|
+
clouds='DO')
|
100
100
|
|
101
101
|
@classmethod
|
102
102
|
def zones_provision_loop(
|
@@ -125,7 +125,7 @@ class DO(clouds.Cloud):
|
|
125
125
|
region: Optional[str] = None,
|
126
126
|
zone: Optional[str] = None,
|
127
127
|
) -> float:
|
128
|
-
return
|
128
|
+
return catalog.get_hourly_cost(
|
129
129
|
instance_type,
|
130
130
|
use_spot=use_spot,
|
131
131
|
region=region,
|
@@ -159,16 +159,16 @@ class DO(clouds.Cloud):
|
|
159
159
|
disk_tier: Optional[resources_utils.DiskTier] = None,
|
160
160
|
) -> Optional[str]:
|
161
161
|
"""Returns the default instance type for DO."""
|
162
|
-
return
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
return catalog.get_default_instance_type(cpus=cpus,
|
163
|
+
memory=memory,
|
164
|
+
disk_tier=disk_tier,
|
165
|
+
clouds='DO')
|
166
166
|
|
167
167
|
@classmethod
|
168
168
|
def get_accelerators_from_instance_type(
|
169
169
|
cls, instance_type: str) -> Optional[Dict[str, Union[int, float]]]:
|
170
|
-
return
|
171
|
-
|
170
|
+
return catalog.get_accelerators_from_instance_type(instance_type,
|
171
|
+
clouds='DO')
|
172
172
|
|
173
173
|
@classmethod
|
174
174
|
def get_zone_shell_cmd(cls) -> Optional[str]:
|
@@ -249,17 +249,17 @@ class DO(clouds.Cloud):
|
|
249
249
|
|
250
250
|
assert len(accelerators) == 1, resources
|
251
251
|
acc, acc_count = list(accelerators.items())[0]
|
252
|
-
(instance_list,
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
252
|
+
(instance_list,
|
253
|
+
fuzzy_candidate_list) = (catalog.get_instance_type_for_accelerator(
|
254
|
+
acc,
|
255
|
+
acc_count,
|
256
|
+
use_spot=resources.use_spot,
|
257
|
+
cpus=resources.cpus,
|
258
|
+
memory=resources.memory,
|
259
|
+
region=resources.region,
|
260
|
+
zone=resources.zone,
|
261
|
+
clouds='DO',
|
262
|
+
))
|
263
263
|
if instance_list is None:
|
264
264
|
return resources_utils.FeasibleResources([], fuzzy_candidate_list,
|
265
265
|
None)
|
@@ -316,7 +316,7 @@ class DO(clouds.Cloud):
|
|
316
316
|
f'No image_id `{image_id}` found') from err
|
317
317
|
|
318
318
|
def instance_type_exists(self, instance_type: str) -> bool:
|
319
|
-
return
|
319
|
+
return catalog.instance_type_exists(instance_type, 'DO')
|
320
320
|
|
321
321
|
def validate_region_zone(self, region: Optional[str], zone: Optional[str]):
|
322
|
-
return
|
322
|
+
return catalog.validate_region_zone(region, zone, clouds='DO')
|