<!-- hello-sky/sky.yaml -->resources:# Optional; if left out, automatically pick the cheapest cloud.cloud:aws# 8x NVIDIA A100 GPUaccelerators:A100:8# Working directory (optional) containing the project codebase.# Its contents are synced to ~/sky_workdir/ on the cluster.workdir:.# Typical use: pip install -r requirements.txt# Invoked under the workdir (i.e., can use its files).setup:|echo "Running setup."# Typical use: make use of resources, such as running training.# Invoked under the workdir (i.e., can use its files).run:|echo "Hello, SkyPilot!"conda env list
To launch a cluster and run a task, use sky launch:
Obviously, it may take a few minutes for the first run (init + launch + run). Just have a cup of coffee :)
In the end, the cluster will finish provisioning and the task will be executed. The outputs will show Hello, SkyPilot! and the list of installed Conda environments.
# After a task’s execution, use rsync or scp to download files
rsync-Pavzmycluster:/remote/source/local/dest# copy from remote VM
Stop/Terminate Cluster
When you are done, stop the cluster with sky stop:
Bash
1
skystopmycluster
To terminate a cluster instead, run sky down:
Bash
1
skydownmycluster
Difference
Stopping a cluster does not lose data on the attached disks (billing for the instances will stop while the disks will still be charged). Those disks will be reattached when restarting the cluster.
Terminating a cluster will delete all associated resources (all billing stops), and any data on the attached disks will be lost. Terminated clusters cannot be restarted.