Skip to content

Commit

Permalink
[Performance] Use new GCP custom images (#4027)
Browse files Browse the repository at this point in the history
* [Performance] Use new custom image to create GCP GPU VMs

* update image tags for both CPU and GPU

* always generate .sky/python_path

---------

Co-authored-by: Yika Luo <[email protected]>
  • Loading branch information
yika-luo and Yika Luo authored Oct 15, 2024
1 parent a4e2fcd commit 53380e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions sky/clouds/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
f'\nTo query common AI images: {colorama.Style.BRIGHT}gcloud compute images list --project deeplearning-platform-release | less{colorama.Style.RESET_ALL}'
)

# Image ID tags
_DEFAULT_CPU_IMAGE_ID = 'skypilot:custom-cpu-ubuntu-2204'
# For GPU-related package version, see sky/clouds/service_catalog/images/provisioners/cuda.sh
_DEFAULT_GPU_IMAGE_ID = 'skypilot:custom-gpu-ubuntu-2204'
_DEFAULT_GPU_K80_IMAGE_ID = 'skypilot:k80-debian-10'


def _run_output(cmd):
proc = subprocess.run(cmd,
Expand Down Expand Up @@ -422,7 +428,7 @@ def make_deploy_resources_variables(
# --no-standard-images
# We use the debian image, as the ubuntu image has some connectivity
# issue when first booted.
image_id = 'skypilot:cpu-debian-11'
image_id = _DEFAULT_CPU_IMAGE_ID

def _failover_disk_tier() -> Optional[resources_utils.DiskTier]:
if (r.disk_tier is not None and
Expand Down Expand Up @@ -487,10 +493,10 @@ def _failover_disk_tier() -> Optional[resources_utils.DiskTier]:
# Though the image is called cu113, it actually has later
# versions of CUDA as noted below.
# CUDA driver version 470.57.02, CUDA Library 11.4
image_id = 'skypilot:k80-debian-10'
image_id = _DEFAULT_GPU_K80_IMAGE_ID
else:
# CUDA driver version 535.86.10, CUDA Library 12.2
image_id = 'skypilot:gpu-debian-11'
image_id = _DEFAULT_GPU_IMAGE_ID

if (resources.image_id is not None and
resources.extract_docker_image() is None):
Expand Down
4 changes: 2 additions & 2 deletions sky/skylet/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@
# We use --system-site-packages to reuse the system site packages to avoid
# the overhead of installing the same packages in the new environment.
f'[ -d {SKY_REMOTE_PYTHON_ENV} ] || '
f'{{ {SKY_PYTHON_CMD} -m venv {SKY_REMOTE_PYTHON_ENV} --system-site-packages && '
f'echo "$(echo {SKY_REMOTE_PYTHON_ENV})/bin/python" > {SKY_PYTHON_PATH_FILE}; }};'
f'{SKY_PYTHON_CMD} -m venv {SKY_REMOTE_PYTHON_ENV} --system-site-packages;'
f'echo "$(echo {SKY_REMOTE_PYTHON_ENV})/bin/python" > {SKY_PYTHON_PATH_FILE};'
)

_sky_version = str(version.parse(sky.__version__))
Expand Down

0 comments on commit 53380e2

Please sign in to comment.