skypilot-nightly 1.0.0.dev20240824__py3-none-any.whl → 1.0.0.dev20240826__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/wheel_utils.py +29 -18
- sky/templates/kubernetes-ray.yml.j2 +49 -2
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/METADATA +1 -1
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/RECORD +9 -9
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/LICENSE +0 -0
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/WHEEL +0 -0
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/entry_points.txt +0 -0
- {skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.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 = '6067e2bcd60c9ae48fa4fb883bbede4b98b4d545'
|
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.dev20240826'
|
39
39
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
40
40
|
|
41
41
|
|
sky/backends/wheel_utils.py
CHANGED
@@ -39,29 +39,30 @@ _WHEEL_PATTERN = (f'{_PACKAGE_WHEEL_NAME}-'
|
|
39
39
|
f'{version.parse(sky.__version__)}-*.whl')
|
40
40
|
|
41
41
|
|
42
|
-
def
|
43
|
-
|
42
|
+
def _remove_stale_wheels(latest_wheel_dir: pathlib.Path) -> None:
|
43
|
+
"""Remove all wheels except the latest one."""
|
44
|
+
for f in WHEEL_DIR.iterdir():
|
45
|
+
if f != latest_wheel_dir:
|
46
|
+
if f.is_dir() and not f.is_symlink():
|
47
|
+
shutil.rmtree(f, ignore_errors=True)
|
48
|
+
|
49
|
+
|
50
|
+
def _get_latest_wheel() -> pathlib.Path:
|
51
|
+
wheel_name = f'**/{_WHEEL_PATTERN}'
|
44
52
|
try:
|
45
53
|
latest_wheel = max(WHEEL_DIR.glob(wheel_name), key=os.path.getctime)
|
46
54
|
except ValueError:
|
47
55
|
raise FileNotFoundError(
|
48
56
|
'Could not find built SkyPilot wheels with glob pattern '
|
49
57
|
f'{wheel_name} under {WHEEL_DIR!r}') from None
|
50
|
-
|
51
|
-
latest_wheel_dir_name = latest_wheel.parent
|
52
|
-
# Cleanup older wheels.
|
53
|
-
for f in WHEEL_DIR.iterdir():
|
54
|
-
if f != latest_wheel_dir_name:
|
55
|
-
if f.is_dir() and not f.is_symlink():
|
56
|
-
shutil.rmtree(f, ignore_errors=True)
|
57
58
|
return latest_wheel
|
58
59
|
|
59
60
|
|
60
|
-
def _build_sky_wheel():
|
61
|
-
"""Build a wheel for SkyPilot."""
|
62
|
-
with tempfile.TemporaryDirectory() as
|
61
|
+
def _build_sky_wheel() -> pathlib.Path:
|
62
|
+
"""Build a wheel for SkyPilot and return the path to the wheel."""
|
63
|
+
with tempfile.TemporaryDirectory() as tmp_dir_str:
|
63
64
|
# prepare files
|
64
|
-
tmp_dir = pathlib.Path(
|
65
|
+
tmp_dir = pathlib.Path(tmp_dir_str)
|
65
66
|
sky_tmp_dir = tmp_dir / 'sky'
|
66
67
|
sky_tmp_dir.mkdir()
|
67
68
|
for item in SKY_PACKAGE_PATH.iterdir():
|
@@ -129,6 +130,7 @@ def _build_sky_wheel():
|
|
129
130
|
wheel_dir = WHEEL_DIR / hash_of_latest_wheel
|
130
131
|
wheel_dir.mkdir(parents=True, exist_ok=True)
|
131
132
|
shutil.move(str(wheel_path), wheel_dir)
|
133
|
+
return wheel_dir / wheel_path.name
|
132
134
|
|
133
135
|
|
134
136
|
def build_sky_wheel() -> Tuple[pathlib.Path, str]:
|
@@ -161,13 +163,22 @@ def build_sky_wheel() -> Tuple[pathlib.Path, str]:
|
|
161
163
|
last_modification_time = _get_latest_modification_time(SKY_PACKAGE_PATH)
|
162
164
|
last_wheel_modification_time = _get_latest_modification_time(WHEEL_DIR)
|
163
165
|
|
164
|
-
#
|
165
|
-
|
166
|
+
# Only build wheels if the wheel is outdated or wheel does not exist
|
167
|
+
# for the requested version.
|
168
|
+
if (last_wheel_modification_time < last_modification_time) or not any(
|
169
|
+
WHEEL_DIR.glob(f'**/{_WHEEL_PATTERN}')):
|
166
170
|
if not WHEEL_DIR.exists():
|
167
171
|
WHEEL_DIR.mkdir(parents=True, exist_ok=True)
|
168
|
-
_build_sky_wheel()
|
169
|
-
|
170
|
-
|
172
|
+
latest_wheel = _build_sky_wheel()
|
173
|
+
else:
|
174
|
+
latest_wheel = _get_latest_wheel()
|
175
|
+
|
176
|
+
# We remove all wheels except the latest one for garbage collection.
|
177
|
+
# Otherwise stale wheels will accumulate over time.
|
178
|
+
# TODO(romilb): If the user switches versions every alternate launch,
|
179
|
+
# the wheel will be rebuilt every time. At the risk of adding
|
180
|
+
# complexity, we can consider TTL caching wheels by version here.
|
181
|
+
_remove_stale_wheels(latest_wheel.parent)
|
171
182
|
|
172
183
|
wheel_hash = latest_wheel.parent.name
|
173
184
|
|
@@ -317,7 +317,54 @@ available_node_types:
|
|
317
317
|
# Do not change this command - it keeps the pod alive until it is
|
318
318
|
# explicitly killed.
|
319
319
|
command: ["/bin/bash", "-c", "--"]
|
320
|
-
args:
|
320
|
+
args:
|
321
|
+
- |
|
322
|
+
# Tails file and checks every 5 sec for
|
323
|
+
# open file handlers with write access
|
324
|
+
# closes if none exist
|
325
|
+
monitor_file() {
|
326
|
+
tail -f $file &
|
327
|
+
TAIL_PID=$!
|
328
|
+
while kill -0 $TAIL_PID 2> /dev/null; do
|
329
|
+
# only two PIDs should be accessing the file
|
330
|
+
# the log appender and log tailer
|
331
|
+
if [ $(lsof -w $file | wc -l) -lt 3 ]; then
|
332
|
+
kill $TAIL_PID
|
333
|
+
break
|
334
|
+
fi
|
335
|
+
# Sleep for 5 seconds before checking again. Do not make this
|
336
|
+
# too short as it will consume CPU, and too long will cause
|
337
|
+
# the file to be closed too late keeping the pod alive.
|
338
|
+
sleep 5
|
339
|
+
done
|
340
|
+
}
|
341
|
+
|
342
|
+
log_tail() {
|
343
|
+
FILE_PATTERN="~/sky_logs/*/tasks/*.log"
|
344
|
+
while ! ls $(eval echo $FILE_PATTERN) 1> /dev/null 2>&1; do
|
345
|
+
sleep 1
|
346
|
+
done
|
347
|
+
|
348
|
+
# Keep track of already monitored files
|
349
|
+
already_monitored=""
|
350
|
+
|
351
|
+
# Infinite loop to continuously check for new files
|
352
|
+
while true; do
|
353
|
+
for file in $(eval echo $FILE_PATTERN); do
|
354
|
+
if echo $already_monitored | grep -q $file; then
|
355
|
+
# File is already being monitored
|
356
|
+
continue
|
357
|
+
fi
|
358
|
+
|
359
|
+
# Monitor the new file
|
360
|
+
monitor_file $file &
|
361
|
+
already_monitored="${already_monitored} ${file}"
|
362
|
+
done
|
363
|
+
sleep 0.1
|
364
|
+
done
|
365
|
+
}
|
366
|
+
trap : TERM INT; log_tail || sleep infinity & wait
|
367
|
+
|
321
368
|
ports:
|
322
369
|
- containerPort: 22 # Used for SSH
|
323
370
|
- containerPort: {{ray_port}} # Redis port
|
@@ -365,7 +412,7 @@ setup_commands:
|
|
365
412
|
# Line 'sudo grep ..': set the number of threads per process to unlimited to avoid ray job submit stucking issue when the number of running ray jobs increase.
|
366
413
|
# Line 'mkdir -p ..': disable host key check
|
367
414
|
# Line 'python3 -c ..': patch the buggy ray files and enable `-o allow_other` option for `goofys`
|
368
|
-
- sudo DEBIAN_FRONTEND=noninteractive apt install gcc patch pciutils rsync fuse curl -y;
|
415
|
+
- sudo DEBIAN_FRONTEND=noninteractive apt install lsof gcc patch pciutils rsync fuse curl -y;
|
369
416
|
mkdir -p ~/.ssh; touch ~/.ssh/config;
|
370
417
|
{%- for initial_setup_command in initial_setup_commands %}
|
371
418
|
{{ initial_setup_command }}
|
{skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
sky/__init__.py,sha256=
|
1
|
+
sky/__init__.py,sha256=irQAdlzMvPbSpPhz6DApwrGhWnyaBnXANdTbIfZcdQ0,5588
|
2
2
|
sky/authentication.py,sha256=PXKsabUKnvhoTNoNwZzo66qjCLAsuc5pQ8esVu0IYh8,20424
|
3
3
|
sky/check.py,sha256=sqUCow5Gqqtp2ouk7tZ3whwDOK23wqyUJvcxMBsich8,9080
|
4
4
|
sky/cli.py,sha256=XlgRr617B_yE2HV_nW01D_m5nWntW2GstutNrMp86UA,201504
|
@@ -33,7 +33,7 @@ sky/backends/backend_utils.py,sha256=k-DQ-xlQElzlb5KhoyoaySw8t36gmsWtgeR24TM23iw
|
|
33
33
|
sky/backends/cloud_vm_ray_backend.py,sha256=EXrJdc2wqKlgPkIrKtF2GYLw-wW_U49HDb0CpaVlIMA,230185
|
34
34
|
sky/backends/docker_utils.py,sha256=Hyw1YY20EyghhEbYx6O2FIMDcGkNzBzV9TM7LFynei8,8358
|
35
35
|
sky/backends/local_docker_backend.py,sha256=H4GBo0KFUC_EEf-ziv1OUbfAkOI5BrwkYs9fYOxSoNw,16741
|
36
|
-
sky/backends/wheel_utils.py,sha256=
|
36
|
+
sky/backends/wheel_utils.py,sha256=3QS4T_Ydvo4DbYhogtyADyNBEf04I6jUCL71M285shQ,7963
|
37
37
|
sky/backends/monkey_patches/monkey_patch_ray_up.py,sha256=76-y2fCaE3JINj8lEwHT1eirYzCbpD8O1ySsysuGu8o,3450
|
38
38
|
sky/benchmark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
sky/benchmark/benchmark_state.py,sha256=X8CXmuU9KgsDRhKedhFgjeRMUFWtQsjFs1qECvPG2yg,8723
|
@@ -226,7 +226,7 @@ sky/templates/jobs-controller.yaml.j2,sha256=QjlIcFBEay48xKT50UWqzgREzili-H7AuUr
|
|
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
228
|
sky/templates/kubernetes-port-forward-proxy-command.sh,sha256=D5T3OUfTlTyiO4ZPwA8fBDyttfESpyWxlSTYrRJdHHA,2614
|
229
|
-
sky/templates/kubernetes-ray.yml.j2,sha256=
|
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
|
232
232
|
sky/templates/local-ray.yml.j2,sha256=FNHeyHF6nW9nU9QLIZceUWfvrFTTcO51KqhTnYCEFaA,1185
|
@@ -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.dev20240826.dist-info/LICENSE,sha256=emRJAvE7ngL6x0RhQvlns5wJzGI3NEQ_WMjNmd9TZc4,12170
|
274
|
+
skypilot_nightly-1.0.0.dev20240826.dist-info/METADATA,sha256=Ys16mAgml6_cs23iKJzpUEWJnF1fR0b6YQUegH-uKSY,18870
|
275
|
+
skypilot_nightly-1.0.0.dev20240826.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
|
276
|
+
skypilot_nightly-1.0.0.dev20240826.dist-info/entry_points.txt,sha256=StA6HYpuHj-Y61L2Ze-hK2IcLWgLZcML5gJu8cs6nU4,36
|
277
|
+
skypilot_nightly-1.0.0.dev20240826.dist-info/top_level.txt,sha256=qA8QuiNNb6Y1OF-pCUtPEr6sLEwy2xJX06Bd_CrtrHY,4
|
278
|
+
skypilot_nightly-1.0.0.dev20240826.dist-info/RECORD,,
|
File without changes
|
{skypilot_nightly-1.0.0.dev20240824.dist-info → skypilot_nightly-1.0.0.dev20240826.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|