skypilot-nightly 1.0.0.dev20250105__py3-none-any.whl → 1.0.0.dev20250107__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 +2 -2
- sky/backends/backend_utils.py +36 -0
- sky/backends/cloud_vm_ray_backend.py +38 -7
- sky/cloud_stores.py +10 -2
- sky/clouds/aws.py +24 -0
- sky/clouds/cloud.py +4 -0
- sky/clouds/gcp.py +9 -0
- sky/clouds/service_catalog/data_fetchers/fetch_gcp.py +10 -51
- sky/clouds/utils/oci_utils.py +9 -0
- sky/data/data_utils.py +8 -4
- sky/provision/oci/query_utils.py +17 -17
- sky/utils/schemas.py +3 -0
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/RECORD +18 -18
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/WHEEL +1 -1
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/top_level.txt +0 -0
sky/__init__.py
CHANGED
@@ -5,7 +5,7 @@ from typing import Optional
|
|
5
5
|
import urllib.request
|
6
6
|
|
7
7
|
# Replaced with the current commit when building the wheels.
|
8
|
-
_SKYPILOT_COMMIT_SHA = '
|
8
|
+
_SKYPILOT_COMMIT_SHA = '6cf98a3cfbed39984b106f95ec7209058c73570d'
|
9
9
|
|
10
10
|
|
11
11
|
def _get_git_commit():
|
@@ -35,7 +35,7 @@ def _get_git_commit():
|
|
35
35
|
|
36
36
|
|
37
37
|
__commit__ = _get_git_commit()
|
38
|
-
__version__ = '1.0.0.
|
38
|
+
__version__ = '1.0.0.dev20250107'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/backends/backend_utils.py
CHANGED
@@ -650,6 +650,42 @@ def _replace_yaml_dicts(
|
|
650
650
|
return common_utils.dump_yaml_str(new_config)
|
651
651
|
|
652
652
|
|
653
|
+
def get_expirable_clouds(
|
654
|
+
enabled_clouds: Sequence[clouds.Cloud]) -> List[clouds.Cloud]:
|
655
|
+
"""Returns a list of clouds that use local credentials and whose credentials can expire.
|
656
|
+
|
657
|
+
This function checks each cloud in the provided sequence to determine if it uses local credentials
|
658
|
+
and if its credentials can expire. If both conditions are met, the cloud is added to the list of
|
659
|
+
expirable clouds.
|
660
|
+
|
661
|
+
Args:
|
662
|
+
enabled_clouds (Sequence[clouds.Cloud]): A sequence of cloud objects to check.
|
663
|
+
|
664
|
+
Returns:
|
665
|
+
list[clouds.Cloud]: A list of cloud objects that use local credentials and whose credentials can expire.
|
666
|
+
"""
|
667
|
+
expirable_clouds = []
|
668
|
+
local_credentials_value = schemas.RemoteIdentityOptions.LOCAL_CREDENTIALS.value
|
669
|
+
for cloud in enabled_clouds:
|
670
|
+
remote_identities = skypilot_config.get_nested(
|
671
|
+
(str(cloud).lower(), 'remote_identity'), None)
|
672
|
+
if remote_identities is None:
|
673
|
+
remote_identities = schemas.get_default_remote_identity(
|
674
|
+
str(cloud).lower())
|
675
|
+
|
676
|
+
local_credential_expiring = cloud.can_credential_expire()
|
677
|
+
if isinstance(remote_identities, str):
|
678
|
+
if remote_identities == local_credentials_value and local_credential_expiring:
|
679
|
+
expirable_clouds.append(cloud)
|
680
|
+
elif isinstance(remote_identities, list):
|
681
|
+
for profile in remote_identities:
|
682
|
+
if list(profile.values(
|
683
|
+
))[0] == local_credentials_value and local_credential_expiring:
|
684
|
+
expirable_clouds.append(cloud)
|
685
|
+
break
|
686
|
+
return expirable_clouds
|
687
|
+
|
688
|
+
|
653
689
|
# TODO: too many things happening here - leaky abstraction. Refactor.
|
654
690
|
@timeline.event
|
655
691
|
def write_cluster_config(
|
@@ -26,6 +26,7 @@ import filelock
|
|
26
26
|
|
27
27
|
import sky
|
28
28
|
from sky import backends
|
29
|
+
from sky import check as sky_check
|
29
30
|
from sky import cloud_stores
|
30
31
|
from sky import clouds
|
31
32
|
from sky import exceptions
|
@@ -1996,6 +1997,22 @@ class RetryingVmProvisioner(object):
|
|
1996
1997
|
skip_unnecessary_provisioning else None)
|
1997
1998
|
|
1998
1999
|
failover_history: List[Exception] = list()
|
2000
|
+
# If the user is using local credentials which may expire, the
|
2001
|
+
# controller may leak resources if the credentials expire while a job
|
2002
|
+
# is running. Here we check the enabled clouds and expiring credentials
|
2003
|
+
# and raise a warning to the user.
|
2004
|
+
if task.is_controller_task():
|
2005
|
+
enabled_clouds = sky_check.get_cached_enabled_clouds_or_refresh()
|
2006
|
+
expirable_clouds = backend_utils.get_expirable_clouds(
|
2007
|
+
enabled_clouds)
|
2008
|
+
|
2009
|
+
if len(expirable_clouds) > 0:
|
2010
|
+
warnings = (f'\033[93mWarning: Credentials used for '
|
2011
|
+
f'{expirable_clouds} may expire. Clusters may be '
|
2012
|
+
f'leaked if the credentials expire while jobs '
|
2013
|
+
f'are running. It is recommended to use credentials'
|
2014
|
+
f' that never expire or a service account.\033[0m')
|
2015
|
+
logger.warning(warnings)
|
1999
2016
|
|
2000
2017
|
# Retrying launchable resources.
|
2001
2018
|
while True:
|
@@ -4199,11 +4216,20 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
|
|
4199
4216
|
attempts = 0
|
4200
4217
|
while True:
|
4201
4218
|
logger.debug(f'instance statuses attempt {attempts + 1}')
|
4202
|
-
|
4203
|
-
|
4204
|
-
|
4205
|
-
|
4206
|
-
|
4219
|
+
try:
|
4220
|
+
node_status_dict = provision_lib.query_instances(
|
4221
|
+
repr(cloud),
|
4222
|
+
cluster_name_on_cloud,
|
4223
|
+
config['provider'],
|
4224
|
+
non_terminated_only=False)
|
4225
|
+
except Exception as e: # pylint: disable=broad-except
|
4226
|
+
if purge:
|
4227
|
+
logger.warning(
|
4228
|
+
f'Failed to query instances. Skipping since purge is '
|
4229
|
+
f'set. Details: '
|
4230
|
+
f'{common_utils.format_exception(e, use_bracket=True)}')
|
4231
|
+
break
|
4232
|
+
raise
|
4207
4233
|
|
4208
4234
|
unexpected_node_state: Optional[Tuple[str, str]] = None
|
4209
4235
|
for node_id, node_status in node_status_dict.items():
|
@@ -4222,8 +4248,13 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
|
|
4222
4248
|
time.sleep(_TEARDOWN_WAIT_BETWEEN_ATTEMPS_SECONDS)
|
4223
4249
|
else:
|
4224
4250
|
(node_id, node_status) = unexpected_node_state
|
4225
|
-
|
4226
|
-
|
4251
|
+
if purge:
|
4252
|
+
logger.warning(f'Instance {node_id} in unexpected '
|
4253
|
+
f'state {node_status}. Skipping since purge '
|
4254
|
+
'is set.')
|
4255
|
+
break
|
4256
|
+
raise RuntimeError(f'Instance {node_id} in unexpected '
|
4257
|
+
f'state {node_status}.')
|
4227
4258
|
|
4228
4259
|
global_user_state.remove_cluster(handle.cluster_name,
|
4229
4260
|
terminate=terminate)
|
sky/cloud_stores.py
CHANGED
@@ -113,8 +113,16 @@ class GcsCloudStorage(CloudStorage):
|
|
113
113
|
@property
|
114
114
|
def _gsutil_command(self):
|
115
115
|
gsutil_alias, alias_gen = data_utils.get_gsutil_command()
|
116
|
-
return (
|
117
|
-
|
116
|
+
return (
|
117
|
+
f'{alias_gen}; GOOGLE_APPLICATION_CREDENTIALS='
|
118
|
+
f'{gcp.DEFAULT_GCP_APPLICATION_CREDENTIAL_PATH}; '
|
119
|
+
# Explicitly activate service account. Unlike the gcp packages
|
120
|
+
# and other GCP commands, gsutil does not automatically pick up
|
121
|
+
# the default credential keys when it is a service account.
|
122
|
+
'gcloud auth activate-service-account '
|
123
|
+
'--key-file=$GOOGLE_APPLICATION_CREDENTIALS '
|
124
|
+
'2> /dev/null || true; '
|
125
|
+
f'{gsutil_alias}')
|
118
126
|
|
119
127
|
def is_directory(self, url: str) -> bool:
|
120
128
|
"""Returns whether 'url' is a directory.
|
sky/clouds/aws.py
CHANGED
@@ -103,6 +103,24 @@ class AWSIdentityType(enum.Enum):
|
|
103
103
|
# region us-east-1 config-file ~/.aws/config
|
104
104
|
SHARED_CREDENTIALS_FILE = 'shared-credentials-file'
|
105
105
|
|
106
|
+
def can_credential_expire(self) -> bool:
|
107
|
+
"""Check if the AWS identity type can expire.
|
108
|
+
|
109
|
+
SSO,IAM_ROLE and CONTAINER_ROLE are temporary credentials and refreshed
|
110
|
+
automatically. ENV and SHARED_CREDENTIALS_FILE are short-lived
|
111
|
+
credentials without refresh.
|
112
|
+
IAM ROLE:
|
113
|
+
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
|
114
|
+
SSO/Container-role refresh token:
|
115
|
+
https://docs.aws.amazon.com/solutions/latest/dea-api/auth-refreshtoken.html
|
116
|
+
"""
|
117
|
+
# TODO(hong): Add a CLI based check for the expiration of the temporary
|
118
|
+
# credentials
|
119
|
+
expirable_types = {
|
120
|
+
AWSIdentityType.ENV, AWSIdentityType.SHARED_CREDENTIALS_FILE
|
121
|
+
}
|
122
|
+
return self in expirable_types
|
123
|
+
|
106
124
|
|
107
125
|
@clouds.CLOUD_REGISTRY.register
|
108
126
|
class AWS(clouds.Cloud):
|
@@ -860,6 +878,12 @@ class AWS(clouds.Cloud):
|
|
860
878
|
if os.path.exists(os.path.expanduser(f'~/.aws/{filename}'))
|
861
879
|
}
|
862
880
|
|
881
|
+
@functools.lru_cache(maxsize=1)
|
882
|
+
def can_credential_expire(self) -> bool:
|
883
|
+
identity_type = self._current_identity_type()
|
884
|
+
return identity_type is not None and identity_type.can_credential_expire(
|
885
|
+
)
|
886
|
+
|
863
887
|
def instance_type_exists(self, instance_type):
|
864
888
|
return service_catalog.instance_type_exists(instance_type, clouds='aws')
|
865
889
|
|
sky/clouds/cloud.py
CHANGED
@@ -536,6 +536,10 @@ class Cloud:
|
|
536
536
|
"""
|
537
537
|
raise NotImplementedError
|
538
538
|
|
539
|
+
def can_credential_expire(self) -> bool:
|
540
|
+
"""Returns whether the cloud credential can expire."""
|
541
|
+
return False
|
542
|
+
|
539
543
|
@classmethod
|
540
544
|
def get_image_size(cls, image_id: str, region: Optional[str]) -> float:
|
541
545
|
"""Check the image size from the cloud.
|
sky/clouds/gcp.py
CHANGED
@@ -132,6 +132,9 @@ class GCPIdentityType(enum.Enum):
|
|
132
132
|
|
133
133
|
SHARED_CREDENTIALS_FILE = ''
|
134
134
|
|
135
|
+
def can_credential_expire(self) -> bool:
|
136
|
+
return self == GCPIdentityType.SHARED_CREDENTIALS_FILE
|
137
|
+
|
135
138
|
|
136
139
|
@clouds.CLOUD_REGISTRY.register
|
137
140
|
class GCP(clouds.Cloud):
|
@@ -863,6 +866,12 @@ class GCP(clouds.Cloud):
|
|
863
866
|
pass
|
864
867
|
return credentials
|
865
868
|
|
869
|
+
@functools.lru_cache(maxsize=1)
|
870
|
+
def can_credential_expire(self) -> bool:
|
871
|
+
identity_type = self._get_identity_type()
|
872
|
+
return identity_type is not None and identity_type.can_credential_expire(
|
873
|
+
)
|
874
|
+
|
866
875
|
@classmethod
|
867
876
|
def _get_identity_type(cls) -> Optional[GCPIdentityType]:
|
868
877
|
try:
|
@@ -47,10 +47,6 @@ TPU_RETRY_CNT = 3
|
|
47
47
|
TPU_V4_ZONES = ['us-central2-b']
|
48
48
|
# TPU v3 pods are available in us-east1-d, but hidden in the skus.
|
49
49
|
# We assume the TPU prices are the same as us-central1.
|
50
|
-
# TPU v6e's pricing info is not available on the SKUs. However, in
|
51
|
-
# https://cloud.google.com/tpu/pricing, it listed the price for 4 regions:
|
52
|
-
# us-east1, us-east5, europe-west4, and asia-northeast1. We hardcode them here
|
53
|
-
# and filtered out the other regions (us-central{1,2}, us-south1).
|
54
50
|
HIDDEN_TPU_DF = pd.read_csv(
|
55
51
|
io.StringIO(
|
56
52
|
textwrap.dedent("""\
|
@@ -62,49 +58,10 @@ HIDDEN_TPU_DF = pd.read_csv(
|
|
62
58
|
,tpu-v3-512,1,,,tpu-v3-512,512.0,153.6,us-east1,us-east1-d
|
63
59
|
,tpu-v3-1024,1,,,tpu-v3-1024,1024.0,307.2,us-east1,us-east1-d
|
64
60
|
,tpu-v3-2048,1,,,tpu-v3-2048,2048.0,614.4,us-east1,us-east1-d
|
65
|
-
,tpu-v6e-1,1,,,tpu-v6e-1,2.7,,us-east5,us-east5-b
|
66
|
-
,tpu-v6e-1,1,,,tpu-v6e-1,2.7,,us-east5,us-east5-c
|
67
|
-
,tpu-v6e-1,1,,,tpu-v6e-1,2.97,,europe-west4,europe-west4-a
|
68
|
-
,tpu-v6e-1,1,,,tpu-v6e-1,3.24,,asia-northeast1,asia-northeast1-b
|
69
|
-
,tpu-v6e-1,1,,,tpu-v6e-1,2.7,,us-east1,us-east1-d
|
70
|
-
,tpu-v6e-4,1,,,tpu-v6e-4,10.8,,us-east5,us-east5-b
|
71
|
-
,tpu-v6e-4,1,,,tpu-v6e-4,10.8,,us-east5,us-east5-c
|
72
|
-
,tpu-v6e-4,1,,,tpu-v6e-4,11.88,,europe-west4,europe-west4-a
|
73
|
-
,tpu-v6e-4,1,,,tpu-v6e-4,12.96,,asia-northeast1,asia-northeast1-b
|
74
|
-
,tpu-v6e-4,1,,,tpu-v6e-4,10.8,,us-east1,us-east1-d
|
75
|
-
,tpu-v6e-8,1,,,tpu-v6e-8,21.6,,us-east5,us-east5-b
|
76
|
-
,tpu-v6e-8,1,,,tpu-v6e-8,21.6,,us-east5,us-east5-c
|
77
|
-
,tpu-v6e-8,1,,,tpu-v6e-8,23.76,,europe-west4,europe-west4-a
|
78
|
-
,tpu-v6e-8,1,,,tpu-v6e-8,25.92,,asia-northeast1,asia-northeast1-b
|
79
|
-
,tpu-v6e-8,1,,,tpu-v6e-8,21.6,,us-east1,us-east1-d
|
80
|
-
,tpu-v6e-16,1,,,tpu-v6e-16,43.2,,us-east5,us-east5-b
|
81
|
-
,tpu-v6e-16,1,,,tpu-v6e-16,43.2,,us-east5,us-east5-c
|
82
|
-
,tpu-v6e-16,1,,,tpu-v6e-16,47.52,,europe-west4,europe-west4-a
|
83
|
-
,tpu-v6e-16,1,,,tpu-v6e-16,51.84,,asia-northeast1,asia-northeast1-b
|
84
|
-
,tpu-v6e-16,1,,,tpu-v6e-16,43.2,,us-east1,us-east1-d
|
85
|
-
,tpu-v6e-32,1,,,tpu-v6e-32,86.4,,us-east5,us-east5-b
|
86
|
-
,tpu-v6e-32,1,,,tpu-v6e-32,86.4,,us-east5,us-east5-c
|
87
|
-
,tpu-v6e-32,1,,,tpu-v6e-32,95.04,,europe-west4,europe-west4-a
|
88
|
-
,tpu-v6e-32,1,,,tpu-v6e-32,103.68,,asia-northeast1,asia-northeast1-b
|
89
|
-
,tpu-v6e-32,1,,,tpu-v6e-32,86.4,,us-east1,us-east1-d
|
90
|
-
,tpu-v6e-64,1,,,tpu-v6e-64,172.8,,us-east5,us-east5-b
|
91
|
-
,tpu-v6e-64,1,,,tpu-v6e-64,172.8,,us-east5,us-east5-c
|
92
|
-
,tpu-v6e-64,1,,,tpu-v6e-64,190.08,,europe-west4,europe-west4-a
|
93
|
-
,tpu-v6e-64,1,,,tpu-v6e-64,207.36,,asia-northeast1,asia-northeast1-b
|
94
|
-
,tpu-v6e-64,1,,,tpu-v6e-64,172.8,,us-east1,us-east1-d
|
95
|
-
,tpu-v6e-128,1,,,tpu-v6e-128,345.6,,us-east5,us-east5-b
|
96
|
-
,tpu-v6e-128,1,,,tpu-v6e-128,345.6,,us-east5,us-east5-c
|
97
|
-
,tpu-v6e-128,1,,,tpu-v6e-128,380.16,,europe-west4,europe-west4-a
|
98
|
-
,tpu-v6e-128,1,,,tpu-v6e-128,414.72,,asia-northeast1,asia-northeast1-b
|
99
|
-
,tpu-v6e-128,1,,,tpu-v6e-128,345.6,,us-east1,us-east1-d
|
100
|
-
,tpu-v6e-256,1,,,tpu-v6e-256,691.2,,us-east5,us-east5-b
|
101
|
-
,tpu-v6e-256,1,,,tpu-v6e-256,691.2,,us-east5,us-east5-c
|
102
|
-
,tpu-v6e-256,1,,,tpu-v6e-256,760.32,,europe-west4,europe-west4-a
|
103
|
-
,tpu-v6e-256,1,,,tpu-v6e-256,829.44,,asia-northeast1,asia-northeast1-b
|
104
|
-
,tpu-v6e-256,1,,,tpu-v6e-256,691.2,,us-east1,us-east1-d
|
105
61
|
""")))
|
106
62
|
|
107
|
-
|
63
|
+
# TPU V6e price for us-central2 is missing in the SKUs.
|
64
|
+
TPU_V6E_MISSING_REGIONS = ['us-central2']
|
108
65
|
|
109
66
|
# TPU V5 is not visible in specific zones. We hardcode the missing zones here.
|
110
67
|
# NOTE(dev): Keep the zones and the df in sync.
|
@@ -670,6 +627,8 @@ def get_tpu_df(gce_skus: List[Dict[str, Any]],
|
|
670
627
|
return 'TpuV5p'
|
671
628
|
assert tpu_version == 'v5litepod', tpu_version
|
672
629
|
return 'TpuV5e'
|
630
|
+
if tpu_version.startswith('v6e'):
|
631
|
+
return 'TpuV6e'
|
673
632
|
return f'Tpu-{tpu_version}'
|
674
633
|
|
675
634
|
def get_tpu_price(row: pd.Series, spot: bool) -> Optional[float]:
|
@@ -684,10 +643,10 @@ def get_tpu_df(gce_skus: List[Dict[str, Any]],
|
|
684
643
|
# whether the TPU is a single device or a pod.
|
685
644
|
# For TPU-v4, the pricing is uniform, and thus the pricing API
|
686
645
|
# only provides the price of TPU-v4 pods.
|
687
|
-
# The price shown for v5 TPU is per chip hour, so there is
|
688
|
-
# keyword in the description.
|
646
|
+
# The price shown for v5 & v6e TPU is per chip hour, so there is
|
647
|
+
# no 'Pod' keyword in the description.
|
689
648
|
is_pod = ((num_cores > 8 or tpu_version == 'v4') and
|
690
|
-
not tpu_version.startswith('v5'))
|
649
|
+
not tpu_version.startswith('v5') and tpu_version != 'v6e')
|
691
650
|
|
692
651
|
for sku in gce_skus + tpu_skus:
|
693
652
|
if tpu_region not in sku['serviceRegions']:
|
@@ -718,7 +677,9 @@ def get_tpu_df(gce_skus: List[Dict[str, Any]],
|
|
718
677
|
# for v5e. Reference here:
|
719
678
|
# https://cloud.google.com/tpu/docs/v5p#using-accelerator-type
|
720
679
|
# https://cloud.google.com/tpu/docs/v5e#tpu-v5e-config
|
721
|
-
|
680
|
+
# v6e is also per chip price. Reference here:
|
681
|
+
# https://cloud.google.com/tpu/docs/v6e#configurations
|
682
|
+
core_per_sku = (1 if tpu_version in ['v5litepod', 'v6e'] else
|
722
683
|
2 if tpu_version == 'v5p' else 8)
|
723
684
|
tpu_core_price = tpu_device_price / core_per_sku
|
724
685
|
tpu_price = num_cores * tpu_core_price
|
@@ -738,8 +699,6 @@ def get_tpu_df(gce_skus: List[Dict[str, Any]],
|
|
738
699
|
spot_str = 'spot ' if spot else ''
|
739
700
|
print(f'The {spot_str}price of {tpu_name} in {tpu_region} is '
|
740
701
|
'not found in SKUs or hidden TPU price DF.')
|
741
|
-
# TODO(tian): Hack. Should investigate how to retrieve the price
|
742
|
-
# for TPU-v6e.
|
743
702
|
if (tpu_name.startswith('tpu-v6e') and
|
744
703
|
tpu_region in TPU_V6E_MISSING_REGIONS):
|
745
704
|
if not spot:
|
sky/clouds/utils/oci_utils.py
CHANGED
@@ -10,6 +10,8 @@ History:
|
|
10
10
|
from ubuntu 20.04 to ubuntu 22.04, including:
|
11
11
|
- GPU: skypilot:gpu-ubuntu-2004 -> skypilot:gpu-ubuntu-2204
|
12
12
|
- CPU: skypilot:cpu-ubuntu-2004 -> skypilot:cpu-ubuntu-2204
|
13
|
+
- Hysun He (hysun.he@oracle.com) @ Jan.01, 2025: Support reuse existing
|
14
|
+
VCN for SkyServe.
|
13
15
|
"""
|
14
16
|
import os
|
15
17
|
|
@@ -109,8 +111,15 @@ class OCIConfig:
|
|
109
111
|
('oci', region, 'compartment_ocid'), default_compartment_ocid)
|
110
112
|
return compartment
|
111
113
|
|
114
|
+
@classmethod
|
115
|
+
def get_vcn_ocid(cls, region):
|
116
|
+
# Will reuse the regional VCN if specified.
|
117
|
+
vcn = skypilot_config.get_nested(('oci', region, 'vcn_ocid'), None)
|
118
|
+
return vcn
|
119
|
+
|
112
120
|
@classmethod
|
113
121
|
def get_vcn_subnet(cls, region):
|
122
|
+
# Will reuse the subnet if specified.
|
114
123
|
vcn = skypilot_config.get_nested(('oci', region, 'vcn_subnet'), None)
|
115
124
|
return vcn
|
116
125
|
|
sky/data/data_utils.py
CHANGED
@@ -523,10 +523,14 @@ def get_gsutil_command() -> Tuple[str, str]:
|
|
523
523
|
|
524
524
|
def run_upload_cli(command: str, access_denied_message: str, bucket_name: str,
|
525
525
|
log_path: str):
|
526
|
-
returncode, stdout, stderr = log_lib.run_with_log(
|
527
|
-
|
528
|
-
|
529
|
-
|
526
|
+
returncode, stdout, stderr = log_lib.run_with_log(
|
527
|
+
command,
|
528
|
+
log_path,
|
529
|
+
shell=True,
|
530
|
+
require_outputs=True,
|
531
|
+
# We need to use bash as some of the cloud commands uses bash syntax,
|
532
|
+
# such as [[ ... ]]
|
533
|
+
executable='/bin/bash')
|
530
534
|
if access_denied_message in stderr:
|
531
535
|
with ux_utils.print_exception_no_traceback():
|
532
536
|
raise PermissionError('Failed to upload files to '
|
sky/provision/oci/query_utils.py
CHANGED
@@ -7,6 +7,8 @@ History:
|
|
7
7
|
find_compartment: allow search subtree when find a compartment.
|
8
8
|
- Hysun He (hysun.he@oracle.com) @ Nov.12, 2024: Add methods to
|
9
9
|
Add/remove security rules: create_nsg_rules & remove_nsg
|
10
|
+
- Hysun He (hysun.he@oracle.com) @ Jan.01, 2025: Support reuse existing
|
11
|
+
VCN for SkyServe.
|
10
12
|
"""
|
11
13
|
from datetime import datetime
|
12
14
|
import functools
|
@@ -17,7 +19,6 @@ import traceback
|
|
17
19
|
import typing
|
18
20
|
from typing import List, Optional, Tuple
|
19
21
|
|
20
|
-
from sky import exceptions
|
21
22
|
from sky import sky_logging
|
22
23
|
from sky.adaptors import common as adaptors_common
|
23
24
|
from sky.adaptors import oci as oci_adaptor
|
@@ -496,26 +497,25 @@ class QueryHelper:
|
|
496
497
|
|
497
498
|
compartment = cls.find_compartment(region)
|
498
499
|
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
raise exceptions.ResourcesUnavailableError(
|
507
|
-
'The VCN is not available')
|
500
|
+
vcn_id = oci_utils.oci_config.get_vcn_ocid(region)
|
501
|
+
if vcn_id is None:
|
502
|
+
list_vcns_resp = net_client.list_vcns(
|
503
|
+
compartment_id=compartment,
|
504
|
+
display_name=oci_utils.oci_config.VCN_NAME,
|
505
|
+
lifecycle_state='AVAILABLE',
|
506
|
+
)
|
508
507
|
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
508
|
+
# Get the primary vnic. The vnic might be an empty list for the
|
509
|
+
# corner case when the cluster was exited during provision.
|
510
|
+
if not list_vcns_resp.data:
|
511
|
+
return None
|
513
512
|
|
514
|
-
|
513
|
+
vcn = list_vcns_resp.data[0]
|
514
|
+
vcn_id = vcn.id
|
515
515
|
|
516
516
|
list_nsg_resp = net_client.list_network_security_groups(
|
517
517
|
compartment_id=compartment,
|
518
|
-
vcn_id=
|
518
|
+
vcn_id=vcn_id,
|
519
519
|
limit=1,
|
520
520
|
display_name=nsg_name,
|
521
521
|
)
|
@@ -532,7 +532,7 @@ class QueryHelper:
|
|
532
532
|
create_network_security_group_details=oci_adaptor.oci.core.models.
|
533
533
|
CreateNetworkSecurityGroupDetails(
|
534
534
|
compartment_id=compartment,
|
535
|
-
vcn_id=
|
535
|
+
vcn_id=vcn_id,
|
536
536
|
display_name=nsg_name,
|
537
537
|
))
|
538
538
|
get_nsg_resp = net_client.get_network_security_group(
|
sky/utils/schemas.py
CHANGED
{skypilot_nightly-1.0.0.dev20250105.dist-info → skypilot_nightly-1.0.0.dev20250107.dist-info}/RECORD
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=hrWDistOqTlG6oaOm4PRKysqzbfeeYqb9MZGb4zqiMc,5944
|
2
2
|
sky/admin_policy.py,sha256=hPo02f_A32gCqhUueF0QYy1fMSSKqRwYEg_9FxScN_s,3248
|
3
3
|
sky/authentication.py,sha256=kACHmiZgWgRpYd1wx1ofbXRMErfMcFmWrkw4a9NxYrY,20988
|
4
4
|
sky/check.py,sha256=s8deMVL-k9y8gd519K7NWZc3DqWsEySwiAr0uH3Vvcc,9459
|
5
5
|
sky/cli.py,sha256=KbvwSMgQJyW-XuX-N_-JFvBRVAEvy295j4UcxypwbyU,214398
|
6
|
-
sky/cloud_stores.py,sha256=
|
6
|
+
sky/cloud_stores.py,sha256=PcLT57_8SZy7o6paAluElfBynaLkbaOq3l-8dNg1AVM,23672
|
7
7
|
sky/core.py,sha256=CPwNZQlC5WKLzTb2Tjo2Uogg0EvOt-yLCRlegqK_92A,38598
|
8
8
|
sky/dag.py,sha256=f3sJlkH4bE6Uuz3ozNtsMhcBpRx7KmC9Sa4seDKt4hU,3104
|
9
9
|
sky/exceptions.py,sha256=rUi_au7QBNn3_wvwa8Y_MSHN3QDRpVLry8Mfa56LyGk,9197
|
@@ -31,8 +31,8 @@ sky/adaptors/runpod.py,sha256=4Nt_BfZhJAKQNA3wO8cxvvNI8x4NsDGHu_4EhRDlGYQ,225
|
|
31
31
|
sky/adaptors/vsphere.py,sha256=zJP9SeObEoLrpgHW2VHvZE48EhgVf8GfAEIwBeaDMfM,2129
|
32
32
|
sky/backends/__init__.py,sha256=UDjwbUgpTRApbPJnNfR786GadUuwgRk3vsWoVu5RB_c,536
|
33
33
|
sky/backends/backend.py,sha256=iBs5gnMaaUoH2OIQ3xhAjWdrJWqj8T61Za9TGsBFpvQ,7515
|
34
|
-
sky/backends/backend_utils.py,sha256=
|
35
|
-
sky/backends/cloud_vm_ray_backend.py,sha256=
|
34
|
+
sky/backends/backend_utils.py,sha256=Eeew8YV0VYSYxozqzadNMZrjhEMjlE3yuzTRP7YSl50,137348
|
35
|
+
sky/backends/cloud_vm_ray_backend.py,sha256=3xKAhfmsnSCCW4ypF08oTyOId2eBbblVjdnZWnM1nug,240910
|
36
36
|
sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
|
37
37
|
sky/backends/local_docker_backend.py,sha256=nSYCjms3HOPjPNOrcCqsUKm1WV3AAovRFjEQ7hcEXW4,17021
|
38
38
|
sky/backends/wheel_utils.py,sha256=5BUzBqfYz7p1ME6_0PXGmcsAkLVb8NrFt317p7a4X8s,8278
|
@@ -41,14 +41,14 @@ sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
41
|
sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
|
42
42
|
sky/benchmark/benchmark_utils.py,sha256=mP8Ox2WiKfthq6LcUAZnHknFQ0n8v9o_rCh1LXLgkqc,26192
|
43
43
|
sky/clouds/__init__.py,sha256=iORaV6auqMxa6-6FKgt1C9f3UqRk1GASUtakua3tb9A,1395
|
44
|
-
sky/clouds/aws.py,sha256=
|
44
|
+
sky/clouds/aws.py,sha256=K9U_nKb2_bJcZ3adarUjIaIzIr8fQiDu470I_yG3Syo,52893
|
45
45
|
sky/clouds/azure.py,sha256=KtnnNZn4ZEr7xndBHxX91v0YXSI1QWPgIefuM1zDUBA,30784
|
46
|
-
sky/clouds/cloud.py,sha256=
|
46
|
+
sky/clouds/cloud.py,sha256=5_ZduUcyCEY1JnX_h0PrJ5xwtPP4oor4jf6cICgSArc,35370
|
47
47
|
sky/clouds/cloud_registry.py,sha256=oLoYFjm_SDTgdHokY7b6A5Utq80HXRQNxV0fLjDdVsQ,2361
|
48
48
|
sky/clouds/cudo.py,sha256=TjlgTklsNhbzpTaqEZ5TudnH7YW9aJpkt4xyAhyaKj0,13094
|
49
49
|
sky/clouds/do.py,sha256=zqibtq1gxNPSNkSkZFPfP5yplfIKCwBss3ry0o4C17c,11198
|
50
50
|
sky/clouds/fluidstack.py,sha256=u2I6jXEtTqgqRWi2EafMsKqc8VkUq1cR6CSDUvk72_U,12407
|
51
|
-
sky/clouds/gcp.py,sha256=
|
51
|
+
sky/clouds/gcp.py,sha256=6QOnefFsYiLCcnajjduLHsayqJ641bBu42jPTpvy7Mc,55007
|
52
52
|
sky/clouds/ibm.py,sha256=0ArRTQx1_DpTNGByFhukzFedEDzmVjBsGiiques1bQ0,21447
|
53
53
|
sky/clouds/kubernetes.py,sha256=OSkglBxvSimmdR8rctb3PfSzkIf5I7vLb5vT0Z18lkw,31544
|
54
54
|
sky/clouds/lambda_cloud.py,sha256=42AmcN2X_wdBMuAw606nR_pQCBAy5QFiAo711_WRqDE,12672
|
@@ -81,18 +81,18 @@ sky/clouds/service_catalog/data_fetchers/fetch_aws.py,sha256=ro2zazdkDF6z9bE7QFy
|
|
81
81
|
sky/clouds/service_catalog/data_fetchers/fetch_azure.py,sha256=7YVnoGDGGZI2TK02bj_LOoD4E5J5CFl6eqz2XlR4Vy8,12790
|
82
82
|
sky/clouds/service_catalog/data_fetchers/fetch_cudo.py,sha256=52P48lvWN0s1ArjeLPeLemPRpxjSRcHincRle0nqdm4,3440
|
83
83
|
sky/clouds/service_catalog/data_fetchers/fetch_fluidstack.py,sha256=yKuAFbjBRNz_e2RNNDT_aHHAuKQ86Ac7GKgIie5O6Pg,7273
|
84
|
-
sky/clouds/service_catalog/data_fetchers/fetch_gcp.py,sha256=
|
84
|
+
sky/clouds/service_catalog/data_fetchers/fetch_gcp.py,sha256=HLxdxA9DMSi19mgpVM_cERV4o-xh_tJ9vmkGm1wOaIE,30868
|
85
85
|
sky/clouds/service_catalog/data_fetchers/fetch_lambda_cloud.py,sha256=MN54h0CAGPHQAeF2eTmuESq3b0-d1kDARRUM6OkivCk,4962
|
86
86
|
sky/clouds/service_catalog/data_fetchers/fetch_vsphere.py,sha256=Opp2r3KSzXPtwk3lKNbO8IX9QzjoRSwy1kW3jPjtS1c,21453
|
87
87
|
sky/clouds/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
88
88
|
sky/clouds/utils/aws_utils.py,sha256=W5BRC-2F_VY4BymRA1kS6-MufsI3V8cfY_hv--4gJBU,1986
|
89
89
|
sky/clouds/utils/azure_utils.py,sha256=NToRBnhEyuUvb-nBnsKTxjhOBRkMcrelL8LK4w6s4t8,3555
|
90
90
|
sky/clouds/utils/gcp_utils.py,sha256=h_ezG7uq2FogLJCPSu8GIEYLOEHmUtC_Xzt4fLOw19s,6853
|
91
|
-
sky/clouds/utils/oci_utils.py,sha256=
|
91
|
+
sky/clouds/utils/oci_utils.py,sha256=WXG4ZFHx0PasVoKIPlXFaYYR_ktreMP5aG8uhUOnAyI,6379
|
92
92
|
sky/clouds/utils/scp_utils.py,sha256=r4lhRLtNgoz5nmkfN2ctAXYugF_-Et8TYH6ZlbbFfo8,15791
|
93
93
|
sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
94
94
|
sky/data/data_transfer.py,sha256=wixC4_3_JaeJFdGKOp-O5ulcsMugDSgrCR0SnPpugGc,8946
|
95
|
-
sky/data/data_utils.py,sha256=
|
95
|
+
sky/data/data_utils.py,sha256=HjcgMDuWRR_fNQ9gjuROi9GgPVvTGApiJwxGtdb2_UU,28860
|
96
96
|
sky/data/mounting_utils.py,sha256=FfOYpu4Rvj8WT4NNLAZPP8nj5k9MQQCXlEgmoid_lus,14455
|
97
97
|
sky/data/storage.py,sha256=07ccD5YaQ9j6R_zPkvNk7qXnW3awDkCn9V-Sx-KXGvo,201715
|
98
98
|
sky/data/storage_utils.py,sha256=cM3kxlffYE7PnJySDu8huyUsMX_JYsf9uer8r5OYsjo,9556
|
@@ -158,7 +158,7 @@ sky/provision/lambda_cloud/lambda_utils.py,sha256=H2Qx4xdJyyEu2IXaj5AyppuPJW385n
|
|
158
158
|
sky/provision/oci/__init__.py,sha256=5E6EUtTK3mqGVREw5TuVl5DxteBYTZigIii7c8gHExU,612
|
159
159
|
sky/provision/oci/config.py,sha256=diSDTyHLokcuXGB2XgZCHFvsXa8bah1PP2XuMouW_UU,1650
|
160
160
|
sky/provision/oci/instance.py,sha256=hsJa4ItkOI3vU5HpNMrbrge9BmJalSPnxX8SwmFJDhk,16728
|
161
|
-
sky/provision/oci/query_utils.py,sha256=
|
161
|
+
sky/provision/oci/query_utils.py,sha256=hrJHqcjE2pxYqv-26Ptx1g1mBmWHhB1eOFO14fJG5VA,28343
|
162
162
|
sky/provision/paperspace/__init__.py,sha256=1nbUPWio7UA5gCQkO_rfEDfgXT17u5OtuByxQx4Ez6g,598
|
163
163
|
sky/provision/paperspace/config.py,sha256=oNmffSt-V466pE0DmML8hOCX1CiA24jAqE5JEKuqpyI,1541
|
164
164
|
sky/provision/paperspace/constants.py,sha256=NcLJGivJxshJwhR28yVHysWQ2gtMAkTVmHC91d3kyKM,957
|
@@ -270,7 +270,7 @@ sky/utils/kubernetes_enums.py,sha256=imGqHSa8O07zD_6xH1SDMM7dBU5lF5fzFFlQuQy00QM
|
|
270
270
|
sky/utils/log_utils.py,sha256=oZYF45uC7GFjAqO-Je-aiX6zhtq91TP-KKaIbQNF-jY,14024
|
271
271
|
sky/utils/resources_utils.py,sha256=Xqi7gxPYw2y5wl5okUI5zx5LEij0hJF_V3Zi8q7TXYg,7890
|
272
272
|
sky/utils/rich_utils.py,sha256=hmnI1X5dKvRIQzB7EyNb34FT97qFNve-0QHqM5r0mVk,3066
|
273
|
-
sky/utils/schemas.py,sha256=
|
273
|
+
sky/utils/schemas.py,sha256=KcU6wSmLQ-2HhfE6m4RHN9D3mqMAc8X1j5vOb-bUki0,30064
|
274
274
|
sky/utils/subprocess_utils.py,sha256=iLOda3vfkD-sIUPlfkDGZs9HnJWLlLRvHVgca9DZH8s,10410
|
275
275
|
sky/utils/timeline.py,sha256=ebHxKJK2HX0utGArrUgSezTPkcwav3VETa_AQS34t-E,3925
|
276
276
|
sky/utils/ux_utils.py,sha256=CqyIFGDuSE8fQasPkna_loZMwtboC9KedR09WEQ7qz0,6502
|
@@ -288,9 +288,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=k0TBoQ4zgf79-sVkixKSGYFHQ7Z
|
|
288
288
|
sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
|
289
289
|
sky/utils/kubernetes/rsync_helper.sh,sha256=h4YwrPFf9727CACnMJvF3EyK_0OeOYKKt4su_daKekw,1256
|
290
290
|
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=Kq1MDygF2IxFmu9FXpCxqucXLmeUrvs6OtRij6XTQbo,6554
|
291
|
-
skypilot_nightly-1.0.0.
|
292
|
-
skypilot_nightly-1.0.0.
|
293
|
-
skypilot_nightly-1.0.0.
|
294
|
-
skypilot_nightly-1.0.0.
|
295
|
-
skypilot_nightly-1.0.0.
|
296
|
-
skypilot_nightly-1.0.0.
|
291
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
292
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/METADATA,sha256=i8irPjzNj_jQfGim8w2tbF7rrbwS-FlTxIOdizEx3Dc,20439
|
293
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
294
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
295
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
296
|
+
skypilot_nightly-1.0.0.dev20250107.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|