-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Use original Python path for SkyPilot runtime #3326
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Michaelvll!
Wondering if we should test against the following. This change invokes <fixed path to ray/sky>
under arbitrary user-created conda env. Let's say
- Ray/Sky depend on some library X requiring certain version range
- User conda env removed this library (or changed its version to be outside the range)
Then, does this change still work?
We may need to run all smoke tests too.
We are invoking the ray/sky in the base or the default env when the VM is just created, instead of the user-created conda env. Just tested with the following yaml and it works well: resources:
cpus: 2+
setup: |
conda activate myenv
if [ $? -ne 0 ]; then
conda create -n myenv python=3.7 -y
conda activate myenv
fi
grep -qxF 'conda activate myenv' ~/.bashrc || echo "conda activate myenv" >> ~/.bashrc
pip install ray==2.6.0
run: |
conda env list
echo hi
echo bye |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Michaelvll! Do we need to run some back compat tests too?
sky/skylet/attempt_skylet.py
Outdated
@@ -27,7 +27,8 @@ def restart_skylet(): | |||
|
|||
|
|||
proc = subprocess.run( | |||
'ps aux | grep -v "grep" | grep "sky.skylet.skylet" | grep "python3 -m"', | |||
f'ps aux | grep -v "grep" | grep "sky.skylet.skylet" | ' | |||
f'grep "{constants.SKY_PYTHON_CMD} -m"', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not grep this too on L16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L16 is for backward compatibility, as we need to make sure that the skylet started before this PR (will not have the full path to the python executable) will be correctly killed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Michaelvll!
Co-authored-by: Zongheng Yang <[email protected]>
This reverts commit c180b2b.
Fixes #3324
master (823999a)
for i in {1..5}; do time sky launch -c test-gcp-$i --cloud gcp --cpus 2 -y; done
mean: 1m56.921s
This PR (39daf35):
for i in {1..5}; do time sky launch -c test-gcp-$i --cloud gcp --cpus 2 -y; done
mean: 2m0.7366s (3.8156s overhead)
Tested (run the relevant ones):
bash format.sh
sky launch --cloud azure -c test-azure --cpus 2+ echo hi
sky launch -c test-env task.yaml --cloud gcp
pytest tests/test_smoke.py
pytest tests/test_smoke.py --aws
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh