diff --git a/examples/oci/gpu-oraclelinux9.yaml b/examples/oci/gpu-oraclelinux9.yaml new file mode 100644 index 00000000000..cc7b05ea0fc --- /dev/null +++ b/examples/oci/gpu-oraclelinux9.yaml @@ -0,0 +1,33 @@ +name: gpu-task + +resources: + # Optional; if left out, automatically pick the cheapest cloud. + cloud: oci + + accelerators: A10:1 + + disk_size: 1024 + + disk_tier: high + + image_id: skypilot:gpu-oraclelinux9 + + +# Working directory (optional) containing the project codebase. +# Its contents are synced to ~/sky_workdir/ on the cluster. +workdir: . + +num_nodes: 1 + +# 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 "*** Running the task on OCI ***" + echo "hello, world" + nvidia-smi + echo "The task is completed." diff --git a/examples/oci/gpu-ubuntu-2204.yaml b/examples/oci/gpu-ubuntu-2204.yaml new file mode 100644 index 00000000000..e0012a31a1a --- /dev/null +++ b/examples/oci/gpu-ubuntu-2204.yaml @@ -0,0 +1,33 @@ +name: gpu-task + +resources: + # Optional; if left out, automatically pick the cheapest cloud. + cloud: oci + + accelerators: A10:1 + + disk_size: 1024 + + disk_tier: high + + image_id: skypilot:gpu-ubuntu-2204 + + +# Working directory (optional) containing the project codebase. +# Its contents are synced to ~/sky_workdir/ on the cluster. +workdir: . + +num_nodes: 1 + +# 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 "*** Running the task on OCI ***" + echo "hello, world" + nvidia-smi + echo "The task is completed." diff --git a/sky/clouds/utils/oci_utils.py b/sky/clouds/utils/oci_utils.py index 0cd4f33e647..581d4d72d3c 100644 --- a/sky/clouds/utils/oci_utils.py +++ b/sky/clouds/utils/oci_utils.py @@ -6,6 +6,10 @@ configuration. - Hysun He (hysun.he@oracle.com) @ Nov.12, 2024: Add the constant SERVICE_PORT_RULE_TAG + - Hysun He (hysun.he@oracle.com) @ Jan.01, 2025: Set the default image + from ubuntu 20.04 to ubuntu 22.04, including: + - GPU: skypilot:gpu-ubuntu-2004 -> skypilot:gpu-ubuntu-2204 + - CPU: skypilot:cpu-ubuntu-2004 -> skypilot:cpu-ubuntu-2204 """ import os @@ -117,7 +121,7 @@ def get_default_gpu_image_tag(cls) -> str: # the sky's user-config file (if not specified, use the hardcode one at # last) return skypilot_config.get_nested(('oci', 'default', 'image_tag_gpu'), - 'skypilot:gpu-ubuntu-2004') + 'skypilot:gpu-ubuntu-2204') @classmethod def get_default_image_tag(cls) -> str: @@ -125,7 +129,7 @@ def get_default_image_tag(cls) -> str: # set the default image tag in the sky's user-config file. (if not # specified, use the hardcode one at last) return skypilot_config.get_nested( - ('oci', 'default', 'image_tag_general'), 'skypilot:cpu-ubuntu-2004') + ('oci', 'default', 'image_tag_general'), 'skypilot:cpu-ubuntu-2204') @classmethod def get_sky_user_config_file(cls) -> str: