Skip to content
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] Disable conda activate for custom docker image as runtime environment #3874

Merged
merged 5 commits into from
Aug 29, 2024

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Aug 26, 2024

Blocked by #3867 and fixes #3741.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • vLLM docker image works:
resources:
  cloud: aws
  image_id: docker:vllm/vllm-openai:latest
  accelerators: T4
run: |
  # conda deactivate # <- dont need to deavtivate
  python3 -c "import huggingface_hub; huggingface_hub.login('hf_xxx')"
  python3 -m vllm.entrypoints.openai.api_server --model meta-llama/Llama-2-7b-chat-hf --tokenizer hf-internal-testing/llama-tokenizer --max-model-len 64
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests:
    • pytest tests/test_smoke.py::test_docker_storage_mounts
    • pytest tests/test_smoke.py::test_job_queue_with_docker
    • pytest tests/test_smoke.py::test_docker_preinstalled_package
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

@@ -126,7 +126,7 @@
# https://github.com/ray-project/ray/issues/31606
# We use python 3.10 to be consistent with the python version of the
# AWS's Deep Learning AMI's default conda environment.
CONDA_INSTALLATION_COMMANDS = (
CONDA_INSTALLATION_COMMANDS = lambda conda_auto_activate: (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we just use .format for this purpose? Having a lambda function in the constants.py is a bit weird.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually tried, but .format does not work for those {} in the installation commands..

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, in that case, let's have a comment here for why we use lambda function here. : )

@cblmemo
Copy link
Collaborator Author

cblmemo commented Aug 26, 2024

Smoke test for this also passed!

@cblmemo cblmemo enabled auto-merge August 29, 2024 17:54
@cblmemo cblmemo added this pull request to the merge queue Aug 29, 2024
Merged via the queue into master with commit bd40b93 Aug 29, 2024
20 checks passed
@cblmemo cblmemo deleted the disable-conda-activate-for-docker branch August 29, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core] SkyPilot conda shadows pre-configured environment in docker containers
2 participants