skypilot-nightly 1.0.0.dev20240903__py3-none-any.whl → 1.0.0.dev20240905__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/adaptors/azure.py +11 -6
- sky/backends/cloud_vm_ray_backend.py +4 -1
- sky/data/storage.py +16 -5
- sky/provision/kubernetes/utils.py +12 -3
- sky/templates/kubernetes-port-forward-proxy-command.sh +10 -4
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/RECORD +12 -12
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/WHEEL +1 -1
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.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 = '455e06587895bbeecafd45ffbda9812413d9db57'
|
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.dev20240905'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/adaptors/azure.py
CHANGED
@@ -177,19 +177,24 @@ def get_client(name: str,
|
|
177
177
|
container_client = blob.ContainerClient.from_container_url(
|
178
178
|
container_url, credential)
|
179
179
|
try:
|
180
|
+
# Suppress noisy logs from Azure SDK when attempting
|
181
|
+
# to run exists() on private container without access.
|
182
|
+
# Reference:
|
183
|
+
# https://github.com/Azure/azure-sdk-for-python/issues/9422
|
184
|
+
azure_logger = logging.getLogger('azure')
|
185
|
+
original_level = azure_logger.getEffectiveLevel()
|
186
|
+
azure_logger.setLevel(logging.CRITICAL)
|
180
187
|
container_client.exists()
|
188
|
+
azure_logger.setLevel(original_level)
|
181
189
|
return container_client
|
182
190
|
except exceptions().ClientAuthenticationError as e:
|
183
191
|
# Caught when user attempted to use private container
|
184
|
-
# without access rights.
|
192
|
+
# without access rights. Raised error is handled at the
|
193
|
+
# upstream.
|
185
194
|
# Reference: https://learn.microsoft.com/en-us/troubleshoot/azure/entra/entra-id/app-integration/error-code-aadsts50020-user-account-identity-provider-does-not-exist # pylint: disable=line-too-long
|
186
195
|
if 'ERROR: AADSTS50020' in str(e):
|
187
196
|
with ux_utils.print_exception_no_traceback():
|
188
|
-
raise
|
189
|
-
'Attempted to fetch a non-existent public '
|
190
|
-
'container name: '
|
191
|
-
f'{container_client.container_name}. '
|
192
|
-
'Please check if the name is correct.')
|
197
|
+
raise e
|
193
198
|
with ux_utils.print_exception_no_traceback():
|
194
199
|
raise sky_exceptions.StorageBucketGetError(
|
195
200
|
'Failed to retreive the container client for the '
|
@@ -3294,11 +3294,14 @@ class CloudVmRayBackend(backends.Backend['CloudVmRayResourceHandle']):
|
|
3294
3294
|
stream_logs=False,
|
3295
3295
|
require_outputs=True)
|
3296
3296
|
if returncode == 255 and 'too long' in stdout + stderr:
|
3297
|
-
# If the
|
3297
|
+
# If the generated script is too long, we retry it with dumping
|
3298
3298
|
# the script to a file and running it with SSH. We use a general
|
3299
3299
|
# length limit check before but it could be inaccurate on some
|
3300
3300
|
# systems.
|
3301
|
+
logger.debug('Failed to submit job due to command length limit. '
|
3302
|
+
'Dumping job to file and running it with SSH.')
|
3301
3303
|
_dump_code_to_file(codegen)
|
3304
|
+
job_submit_cmd = f'{mkdir_code} && {code}'
|
3302
3305
|
returncode, stdout, stderr = self.run_on_head(handle,
|
3303
3306
|
job_submit_cmd,
|
3304
3307
|
stream_logs=False,
|
sky/data/storage.py
CHANGED
@@ -2541,11 +2541,22 @@ class AzureBlobStore(AbstractStore):
|
|
2541
2541
|
container_url = data_utils.AZURE_CONTAINER_URL.format(
|
2542
2542
|
storage_account_name=self.storage_account_name,
|
2543
2543
|
container_name=self.name)
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2547
|
-
|
2548
|
-
|
2544
|
+
try:
|
2545
|
+
container_client = data_utils.create_az_client(
|
2546
|
+
client_type='container',
|
2547
|
+
container_url=container_url,
|
2548
|
+
storage_account_name=self.storage_account_name,
|
2549
|
+
resource_group_name=self.resource_group_name)
|
2550
|
+
except azure.exceptions().ClientAuthenticationError as e:
|
2551
|
+
if 'ERROR: AADSTS50020' in str(e):
|
2552
|
+
# Caught when failing to obtain container client due to
|
2553
|
+
# lack of permission to passed given private container.
|
2554
|
+
if self.resource_group_name is None:
|
2555
|
+
with ux_utils.print_exception_no_traceback():
|
2556
|
+
raise exceptions.StorageBucketGetError(
|
2557
|
+
_BUCKET_FAIL_TO_CONNECT_MESSAGE.format(
|
2558
|
+
name=self.name))
|
2559
|
+
raise
|
2549
2560
|
if container_client.exists():
|
2550
2561
|
is_private = (True if
|
2551
2562
|
container_client.get_container_properties().get(
|
@@ -935,7 +935,8 @@ def construct_ssh_jump_command(
|
|
935
935
|
ssh_jump_user: str = 'sky',
|
936
936
|
proxy_cmd_path: Optional[str] = None,
|
937
937
|
proxy_cmd_target_pod: Optional[str] = None,
|
938
|
-
current_kube_context: Optional[str] = None
|
938
|
+
current_kube_context: Optional[str] = None,
|
939
|
+
current_kube_namespace: Optional[str] = None) -> str:
|
939
940
|
ssh_jump_proxy_command = (f'ssh -tt -i {private_key_path} '
|
940
941
|
'-o StrictHostKeyChecking=no '
|
941
942
|
'-o UserKnownHostsFile=/dev/null '
|
@@ -949,9 +950,12 @@ def construct_ssh_jump_command(
|
|
949
950
|
os.chmod(proxy_cmd_path, os.stat(proxy_cmd_path).st_mode | 0o111)
|
950
951
|
kube_context_flag = f' {current_kube_context}' if (current_kube_context
|
951
952
|
is not None) else ''
|
953
|
+
kube_namespace_flag = f' {current_kube_namespace}' if (
|
954
|
+
current_kube_namespace is not None) else ''
|
952
955
|
ssh_jump_proxy_command += (f' -o ProxyCommand=\'{proxy_cmd_path} '
|
953
956
|
f'{proxy_cmd_target_pod}'
|
954
|
-
f'{kube_context_flag}
|
957
|
+
f'{kube_context_flag}'
|
958
|
+
f'{kube_namespace_flag}\'')
|
955
959
|
return ssh_jump_proxy_command
|
956
960
|
|
957
961
|
|
@@ -1017,13 +1021,18 @@ def get_ssh_proxy_command(
|
|
1017
1021
|
else:
|
1018
1022
|
ssh_jump_proxy_command_path = create_proxy_command_script()
|
1019
1023
|
current_context = get_current_kube_config_context_name()
|
1024
|
+
current_namespace = get_current_kube_config_context_namespace()
|
1020
1025
|
ssh_jump_proxy_command = construct_ssh_jump_command(
|
1021
1026
|
private_key_path,
|
1022
1027
|
ssh_jump_ip,
|
1023
1028
|
ssh_jump_user=constants.SKY_SSH_USER_PLACEHOLDER,
|
1024
1029
|
proxy_cmd_path=ssh_jump_proxy_command_path,
|
1025
1030
|
proxy_cmd_target_pod=k8s_ssh_target,
|
1026
|
-
|
1031
|
+
# We embed both the current context and namespace to the SSH proxy
|
1032
|
+
# command to make sure SSH still works when the current
|
1033
|
+
# context/namespace is changed by the user.
|
1034
|
+
current_kube_context=current_context,
|
1035
|
+
current_kube_namespace=current_namespace)
|
1027
1036
|
return ssh_jump_proxy_command
|
1028
1037
|
|
1029
1038
|
|
@@ -3,12 +3,13 @@ set -uo pipefail
|
|
3
3
|
|
4
4
|
# Check if pod name is passed as an argument
|
5
5
|
if [ $# -lt 1 ]; then
|
6
|
-
echo "Usage: $0 <pod_name> [kube_context]" >&2
|
6
|
+
echo "Usage: $0 <pod_name> [kube_context] [kube_namespace]" >&2
|
7
7
|
exit 1
|
8
8
|
fi
|
9
9
|
|
10
10
|
POD_NAME="$1" # The first argument is the name of the pod
|
11
11
|
KUBE_CONTEXT="${2:-}" # The second argument is the kube context, default is empty
|
12
|
+
KUBE_NAMESPACE="${3:-}" # The third argument is the kube namespace, default is empty
|
12
13
|
|
13
14
|
# Checks if socat is installed
|
14
15
|
if ! command -v socat > /dev/null; then
|
@@ -27,12 +28,17 @@ fi
|
|
27
28
|
# This is preferred because of socket re-use issues in kubectl port-forward,
|
28
29
|
# see - https://github.com/kubernetes/kubernetes/issues/74551#issuecomment-769185879
|
29
30
|
KUBECTL_OUTPUT=$(mktemp)
|
31
|
+
KUBECTL_ARGS=()
|
32
|
+
|
30
33
|
if [ -n "$KUBE_CONTEXT" ]; then
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
+
KUBECTL_ARGS+=("--context=$KUBE_CONTEXT")
|
35
|
+
fi
|
36
|
+
if [ -n "$KUBE_NAMESPACE" ]; then
|
37
|
+
KUBECTL_ARGS+=("--namespace=$KUBE_NAMESPACE")
|
34
38
|
fi
|
35
39
|
|
40
|
+
kubectl "${KUBECTL_ARGS[@]}" port-forward pod/"${POD_NAME}" :22 > "${KUBECTL_OUTPUT}" 2>&1 &
|
41
|
+
|
36
42
|
# Capture the PID for the backgrounded kubectl command
|
37
43
|
K8S_PORT_FWD_PID=$!
|
38
44
|
|
{skypilot_nightly-1.0.0.dev20240903.dist-info → skypilot_nightly-1.0.0.dev20240905.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=O6sIV6h0wqQdKVucMKUe-A0H6sUtqftxloNcDTeFgZQ,5588
|
2
2
|
sky/authentication.py,sha256=PXKsabUKnvhoTNoNwZzo66qjCLAsuc5pQ8esVu0IYh8,20424
|
3
3
|
sky/check.py,sha256=sqUCow5Gqqtp2ouk7tZ3whwDOK23wqyUJvcxMBsich8,9080
|
4
4
|
sky/cli.py,sha256=2cOw3lXzRA-uLlEH-eK7N_1VmUpf1LR4Ztu-ZaKu3Is,201673
|
@@ -16,7 +16,7 @@ sky/status_lib.py,sha256=J7Jb4_Dz0v2T64ttOdyUgpokvl4S0sBJrMfH7Fvo51A,1457
|
|
16
16
|
sky/task.py,sha256=KDsTBIxYpkCOPHv3_ei5H3LDMiGHvDeS9_2HeL6yyLA,49766
|
17
17
|
sky/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
sky/adaptors/aws.py,sha256=jz3E8YyeGscgLZvFE6A1SkxpH6o_inZ-0NiXdRnxSGA,6863
|
19
|
-
sky/adaptors/azure.py,sha256=
|
19
|
+
sky/adaptors/azure.py,sha256=AmiNSSbgLrBEA_GefyRx5EKr8rWlvrClt1PLogFpkd0,21309
|
20
20
|
sky/adaptors/cloudflare.py,sha256=0JA41HeZeYoqcJoEyol01caYgt8UrlpcZJJ6ToU-Fg8,7594
|
21
21
|
sky/adaptors/common.py,sha256=Tz98vqZrYMf_EoIIqaZv8DQcbW5a_xSGf7RoAhCEDlo,2354
|
22
22
|
sky/adaptors/cudo.py,sha256=WGvIQrlzJkGDe02Ve7pygA56tHwUc4kwS3XHW8kMFAA,239
|
@@ -30,7 +30,7 @@ sky/adaptors/vsphere.py,sha256=zJP9SeObEoLrpgHW2VHvZE48EhgVf8GfAEIwBeaDMfM,2129
|
|
30
30
|
sky/backends/__init__.py,sha256=UDjwbUgpTRApbPJnNfR786GadUuwgRk3vsWoVu5RB_c,536
|
31
31
|
sky/backends/backend.py,sha256=xtxR6boDv1o-uSCjbJhOMkKMnZvBZh3gExx4khFWPTI,5932
|
32
32
|
sky/backends/backend_utils.py,sha256=8RDFfrr-1xnefnLhRKK2d8xlFBLR43ZjcDShB2K7_m8,126163
|
33
|
-
sky/backends/cloud_vm_ray_backend.py,sha256=
|
33
|
+
sky/backends/cloud_vm_ray_backend.py,sha256=6JT-SkUbNDu3kBYPxN6kxwz78WUEKjYpzlyk61yCuHI,232351
|
34
34
|
sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
|
35
35
|
sky/backends/local_docker_backend.py,sha256=H4GBo0KFUC_EEf-ziv1OUbfAkOI5BrwkYs9fYOxSoNw,16741
|
36
36
|
sky/backends/wheel_utils.py,sha256=3QS4T_Ydvo4DbYhogtyADyNBEf04I6jUCL71M285shQ,7963
|
@@ -90,7 +90,7 @@ sky/data/__init__.py,sha256=Nhaf1NURisXpZuwWANa2IuCyppIuc720FRwqSE2oEwY,184
|
|
90
90
|
sky/data/data_transfer.py,sha256=MBmjey9_p2L3IKNKTi8um09SlZe32n4wK3CkVnlTVvo,7346
|
91
91
|
sky/data/data_utils.py,sha256=-P5GsDH_m4slrCz4vHdgiFezIys8ufzvhEKePJwfjFc,28597
|
92
92
|
sky/data/mounting_utils.py,sha256=44YkYIIgArEkyvxCtfmXXumybrU8bmn1TfLXWv_eldI,11480
|
93
|
-
sky/data/storage.py,sha256=
|
93
|
+
sky/data/storage.py,sha256=WkWnvvhIPDrRryCjY2Q72DIrnnD4mimtIVeMhlqBbkg,161968
|
94
94
|
sky/data/storage_utils.py,sha256=-s0iQhV8JVx1J2gWtoBFrN04MGv2oVYxo_Hw43R2BSY,6867
|
95
95
|
sky/jobs/__init__.py,sha256=9cqFutVlfjQb7t8hzG-ZlQmMlbmfMirn0KNBxIFnJYQ,1398
|
96
96
|
sky/jobs/constants.py,sha256=YLgcCg_RHSYr_rfsI_4UIdXk78KKKOK29Oem88t5j8I,1350
|
@@ -140,7 +140,7 @@ sky/provision/kubernetes/config.py,sha256=Um6ec0SEhYKFwhh0zSfptYXgfoHjb51kOAVJtf
|
|
140
140
|
sky/provision/kubernetes/instance.py,sha256=wvxtzIt0fjXtIyvdDQplPMQkrz9cuzi8gTeLVE9ggfc,38044
|
141
141
|
sky/provision/kubernetes/network.py,sha256=GJ-tmd2LWcRVvXvTLP6dfQgRAgW2lsQvLpKF2mZ-sHo,11172
|
142
142
|
sky/provision/kubernetes/network_utils.py,sha256=U_QOStUfrOjINk2zG6UZD2H6wd5LWqODruq7QWm6Coo,11079
|
143
|
-
sky/provision/kubernetes/utils.py,sha256=
|
143
|
+
sky/provision/kubernetes/utils.py,sha256=CkZNqpc_KsuHkZ9IGPgBzLSQsagoc3YI_MfAicUAevQ,72867
|
144
144
|
sky/provision/kubernetes/manifests/smarter-device-manager-configmap.yaml,sha256=AMzYzlY0JIlfBWj5eX054Rc1XDW2thUcLSOGMJVhIdA,229
|
145
145
|
sky/provision/kubernetes/manifests/smarter-device-manager-daemonset.yaml,sha256=RtTq4F1QUmR2Uunb6zuuRaPhV7hpesz4saHjn3Ncsb4,2010
|
146
146
|
sky/provision/paperspace/__init__.py,sha256=1nbUPWio7UA5gCQkO_rfEDfgXT17u5OtuByxQx4Ez6g,598
|
@@ -225,7 +225,7 @@ sky/templates/ibm-ray.yml.j2,sha256=RMBUqPId8i4CnVwcyfK3DbRapF1jFMuGQlY0E0PFbMU,
|
|
225
225
|
sky/templates/jobs-controller.yaml.j2,sha256=QjlIcFBEay48xKT50UWqzgREzili-H7AuUrnGHWOpI8,1554
|
226
226
|
sky/templates/kubernetes-ingress.yml.j2,sha256=73iDklVDWBMbItg0IexCa6_ClXPJOxw7PWz3leku4nE,1340
|
227
227
|
sky/templates/kubernetes-loadbalancer.yml.j2,sha256=IxrNYM366N01bbkJEbZ_UPYxUP8wyVEbRNFHRsBuLsw,626
|
228
|
-
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=
|
228
|
+
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=FOSBmZw4gD-Is0BwILqOWoMYSTJODAc1EUVqaXhdGJY,2778
|
229
229
|
sky/templates/kubernetes-ray.yml.j2,sha256=YjNQNF1AcV_KEnEC-fDSGx5Ix6Ci0y9JOgJpYzwUcgg,18061
|
230
230
|
sky/templates/kubernetes-ssh-jump.yml.j2,sha256=k5W5sOIMppU7dDkJMwPlqsUcb92y7L5_TVG3hkgMy8M,2747
|
231
231
|
sky/templates/lambda-ray.yml.j2,sha256=SY3-itV1QJ6BoIDQ9Qm8XwfYgphyO7XfAzm7SsQtyc0,5738
|
@@ -270,9 +270,9 @@ sky/utils/kubernetes/k8s_gpu_labeler_job.yaml,sha256=KPqp23B-zQ2SZK03jdHeF9fLTog
|
|
270
270
|
sky/utils/kubernetes/k8s_gpu_labeler_setup.yaml,sha256=VLKT2KKimZu1GDg_4AIlIt488oMQvhRZWwsj9vBbPUg,3812
|
271
271
|
sky/utils/kubernetes/rsync_helper.sh,sha256=1ad-m4s8QTPxaBQxNIL8AGDfX4un6T0dxZgk-R7OLyE,154
|
272
272
|
sky/utils/kubernetes/ssh_jump_lifecycle_manager.py,sha256=RFLJ3k7MR5UN4SKHykQ0lV9SgXumoULpKYIAt1vh-HU,6560
|
273
|
-
skypilot_nightly-1.0.0.
|
274
|
-
skypilot_nightly-1.0.0.
|
275
|
-
skypilot_nightly-1.0.0.
|
276
|
-
skypilot_nightly-1.0.0.
|
277
|
-
skypilot_nightly-1.0.0.
|
278
|
-
skypilot_nightly-1.0.0.
|
273
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
274
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/METADATA,sha256=LaP-MhHbrV_mwAlAWg6cfjDEcFrbGHk-CqZkUW8o9aA,18870
|
275
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
276
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
277
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
278
|
+
skypilot_nightly-1.0.0.dev20240905.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|