Skip to content

Commit

Permalink
chore: create alias to source sky env in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sachiniyer committed Jan 10, 2025
1 parent fd1ac0e commit f4606ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sky/templates/jobs-controller.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ setup: |
echo 'export SKYPILOT_DEV=1' >> ~/.bashrc
{% endif %}

{% if controller_envs.get("SKYPILOT_DEV") %}
type sky-env > /dev/null 2>&1 || echo 'alias sky-env="{{ sky_activate_python_env }}"' >> ~/.bashrc
{% endif %}

# Create systemd service file
mkdir -p ~/.config/systemd/user/

Expand Down
4 changes: 4 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,10 @@ setup: |
{{cmd}}
{%- endfor %}

{% if controller_envs.get("SKYPILOT_DEV") %}
type sky-env > /dev/null 2>&1 || 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

0 comments on commit f4606ce

Please sign in to comment.