Skip to content

Commit

Permalink
Vast: launch template cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kristopolous committed Jan 16, 2025
1 parent 1736013 commit b65fc2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion sky/provision/vast/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def launch(name: str, instance_type: str, region: str, disk_size: int,
'direct': True,
'ssh': True,
'env': '-e __SOURCE=skypilot',
'onstart_cmd': 'touch ~/.no_auto_tmux;apt install lsof',
'onstart_cmd': ';'.join([
'touch ~/.no_auto_tmux',
f'echo "{vast.vast().api_key}" > ~/.vast_api_key',
]),
'label': name,
'image': image_name
}
Expand Down
5 changes: 2 additions & 3 deletions sky/templates/vast-ray.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ setup_commands:
mkdir -p ~/.ssh; touch ~/.ssh/config;
{{ conda_installation_commands }}
{{ ray_skypilot_installation_commands }}
touch ~/.sudo_as_admin_successful;
sudo bash -c 'rm -rf /etc/security/limits.d; echo "* soft nofile 1048576" >> /etc/security/limits.conf; echo "* hard nofile 1048576" >> /etc/security/limits.conf';
sudo grep -e '^DefaultTasksMax' /etc/systemd/system.conf || (sudo bash -c 'echo "DefaultTasksMax=infinity" >> /etc/systemd/system.conf'); sudo systemctl set-property user-$(id -u $(whoami)).slice TasksMax=infinity; sudo systemctl daemon-reload;
mkdir -p ~/.ssh; (grep -Pzo -q "Host \*\n StrictHostKeyChecking no" ~/.ssh/config) || printf "Host *\n StrictHostKeyChecking no\n" >> ~/.ssh/config;
[ -f /etc/fuse.conf ] && sudo sed -i 's/#user_allow_other/user_allow_other/g' /etc/fuse.conf || (sudo sh -c 'echo "user_allow_other" > /etc/fuse.conf');
(grep -Pzo -q "Host \*\n StrictHostKeyChecking no" ~/.ssh/config) || printf "Host *\n StrictHostKeyChecking no\n" >> ~/.ssh/config;


# Command to start ray clusters are now placed in `sky.provision.instance_setup`.
# We do not need to list it here anymore.

0 comments on commit b65fc2d

Please sign in to comment.