-
Notifications
You must be signed in to change notification settings - Fork 589
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] More robust conda setup when python 3.12 is in the image #4035
Conversation
sky/skylet/constants.py
Outdated
'echo "Creating conda env with Python 3.10" && ' | ||
f'conda create -y -n {SKY_REMOTE_PYTHON_ENV_NAME} python=3.10 && ' | ||
f'conda activate {SKY_REMOTE_PYTHON_ENV_NAME};' | ||
f'PYTHON_EXEC=$(conda run -n {SKY_REMOTE_PYTHON_ENV_NAME} which python3); ' |
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.
This is the main place that we get the correct path for python3
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 for fixing this @Michaelvll ! A quick question - do we need to change the python path file to $PYTHON_EXEC as well?
Cool, I didn't know uv venv had this feature! Maybe this is too ambitious, but do we need conda at all if we can do this? |
Yep, we should gradually get rid of conda. As we have move off the dependency of conda for our internal dependencies, the main purpose of conda now is just to make sure that a user gets the same python env when they start machines on any cloud and can do conda commands. The next step would be: |
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.
Sounds good, ty. We should do smoke tests and the testing plan you mention in the PR description.
…obust-conda-setup
Co-authored-by: Christopher Cooper <[email protected]>
A user said this PR resolves their issue with a image with python 3.12 as the base python |
There seems no significant performance difference. Merging this PR after the smoke tests passed. |
/smoke-test --aws |
/quicktest-core |
/smoke-test --aws -k test_job_queue_with_docker |
/smoke-test --aws -k test_managed_jobs_pipeline_recovery_aws |
/smoke-test --aws -k test_managed_jobs_retry_logs |
Not urgent, but this makes the python path for the case where python 3.12 is the default python in the custom image.
Performance tests
On default image
Ran for 5 times
Master
Current PR
Tested (run the relevant ones):
bash format.sh
sky launch --image-id docker:ubuntu --cpus 2 --cloud aws
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
conda deactivate; bash -i tests/backward_compatibility_tests.sh