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

[Core] Support custom image on Azure #3362

Merged
merged 9 commits into from
Mar 31, 2024
Merged

[Core] Support custom image on Azure #3362

merged 9 commits into from
Mar 31, 2024

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Mar 24, 2024

This PR adds support for custom images on Azure. Partially fixes #2910.

Related: skypilot-org/skypilot-catalog#66

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky launch --cloud azure --image-id microsoft-dsvm:ubuntu-2004:2004:21.11.04 and check the image on the cloud console
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
    • pytest tests/test_smoke.py::test_azure_images
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the support for Azure custom image @cblmemo! This is awesome. Left several comments.

@@ -194,6 +194,10 @@ Available fields:
# Or machine image: https://cloud.google.com/compute/docs/machine-images
# image_id: projects/my-project/global/machineImages/my-machine-image
#
# Azure
# To find Azure images: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage
# image_id: microsoft-dsvm:ubuntu-2004:2004:21.11.04
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should use / for separation or :

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the standard format on Azure (look at the fifth column):

az vm image list --publisher microsoft-dsvm --all --output table | grep ubuntu-hpc
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2021051701                          18.04.2021051701
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2021110101                          18.04.2021110101
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2021120101                          18.04.2021120101
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2022061601                          18.04.2022061601
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2022121201                          18.04.2022121201
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2023031501                          18.04.2023031501
x64             ubuntu-hpc                    microsoft-dsvm  1804                      microsoft-dsvm:ubuntu-hpc:1804:18.04.2023063001                          18.04.2023063001
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2021051401                          20.04.2021051401
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2021110101                          20.04.2021110101
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2021120101                          20.04.2021120101
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2022121201                          20.04.2022121201
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2023011101                          20.04.2023011101
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2023031501                          20.04.2023031501
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2023063001                          20.04.2023063001
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2023080201                          20.04.2023080201
x64             ubuntu-hpc                    microsoft-dsvm  2004                      microsoft-dsvm:ubuntu-hpc:2004:20.04.2023111801                          20.04.2023111801
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023041401             20.04.2023041401
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023041701             20.04.2023041701
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023042401             20.04.2023042401
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023051001             20.04.2023051001
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023063001             20.04.2023063001
x64             ubuntu-hpc                    microsoft-dsvm  2004-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2004-preview-ndv5:20.04.2023080201             20.04.2023080201
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023041401                          22.04.2023041401
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023041701                          22.04.2023041701
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023042401                          22.04.2023042401
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023051001                          22.04.2023051001
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023061401                          22.04.2023061401
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023063001                          22.04.2023063001
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023080201                          22.04.2023080201
x64             ubuntu-hpc                    microsoft-dsvm  2204                      microsoft-dsvm:ubuntu-hpc:2204:22.04.2023111801                          22.04.2023111801
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023041401             22.04.2023041401
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023041701             22.04.2023041701
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023042401             22.04.2023042401
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023051001             22.04.2023051001
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023061401             22.04.2023061401
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023070601             22.04.2023070601
x64             ubuntu-hpc                    microsoft-dsvm  2204-preview-ndv5         microsoft-dsvm:ubuntu-hpc:2204-preview-ndv5:22.04.2023080201             22.04.2023080201

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I : sounds good to me then.

sky/clouds/azure.py Outdated Show resolved Hide resolved
tests/test_optimizer_dryruns.py Show resolved Hide resolved
Copy link
Collaborator

@Michaelvll Michaelvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the support for Azure custom image @cblmemo! LGTM. Please feel free to merge it once the tests pass.

sky/adaptors/azure.py Outdated Show resolved Hide resolved
sky/clouds/azure.py Outdated Show resolved Hide resolved
@cblmemo cblmemo merged commit e2df725 into master Mar 31, 2024
20 checks passed
@cblmemo cblmemo deleted the azure-custom-image branch March 31, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot choose Custom V-net and custom images in Azure
2 participants