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

chore: create alias to source sky env in dev mode #4553

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sky/templates/jobs-controller.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ setup: |
{{cmd}}
{%- endfor %}

{% if is_dev %}
# Internal: disable logging for manually logging into the jobs controller for debugging.
echo 'export SKYPILOT_DEV=1' >> ~/.bashrc
{% if controller_envs.get("SKYPILOT_DEV") %}
grep -q "export SKYPILOT_DEV=" ~/.bashrc || echo 'export SKYPILOT_DEV=1' >> ~/.bashrc
grep -q "alias sky-env=" ~/.bashrc || echo 'alias sky-env="{{ sky_activate_python_env }}"' >> ~/.bashrc
{% endif %}

# Create systemd service file
Expand Down
5 changes: 5 additions & 0 deletions sky/templates/sky-serve-controller.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ setup: |
{{cmd}}
{%- endfor %}

{% if controller_envs.get("SKYPILOT_DEV") %}
grep -q "export SKYPILOT_DEV=" ~/.bashrc || echo 'export SKYPILOT_DEV=1' >> ~/.bashrc
grep -q "alias sky-env=" ~/.bashrc || echo 'alias sky-env="{{ sky_activate_python_env }}"' >> ~/.bashrc
{% endif %}

# Install serve dependencies.
# TODO(tian): Gather those into serve constants.
pip list | grep uvicorn > /dev/null 2>&1 || pip install uvicorn > /dev/null 2>&1
Expand Down
Loading