Skip to content

Commit

Permalink
Make ray image parameter as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Shilpa Chugh authored and openshift-merge-bot[bot] committed Jul 26, 2024
1 parent 62ce155 commit 029683f
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 33 deletions.
3 changes: 2 additions & 1 deletion docs/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ cluster = Cluster(ClusterConfiguration(
min_memory=2, # Default 2
max_memory=2, # Default 2
num_gpus=0, # Default 0
image="quay.io/rhoai/ray:2.23.0-py39-cu121", # Mandatory Field
# image="", # Optional Field
machine_types=["m5.xlarge", "g4dn.xlarge"],
labels={"exampleLabel": "example", "secondLabel": "example"},
))
```
Note: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. If you have your own Ray image which suits your purposes, specify it in image field to override the default image.

The `labels={"exampleLabel": "example"}` parameter can be used to apply additional labels to the RayCluster resource.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding Ray Cluster).\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
" max_cpus=8, \n",
" min_memory=16, \n",
" max_memory=16, \n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
" ))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"metadata": {},
"source": [
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand All @@ -61,7 +61,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
" ))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
"auth.login()"
]
},
{
"cell_type": "markdown",
"id": "18de2d65",
"metadata": {},
"source": [
"\n",
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -52,8 +62,9 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand All @@ -71,7 +71,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
"auth.login()"
]
},
{
"cell_type": "markdown",
"id": "bc27f84c",
"metadata": {},
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -53,7 +64,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"source": [
"Once again, let's start by running through the same cluster setup as before:\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand All @@ -65,11 +65,11 @@
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" num_gpus=1,\n",
" num_workers=2,\n",
" min_cpus='250m',\n",
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=6,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" min_cpus=2,\n",
" max_cpus=2,\n",
" min_memory=8,\n",
" max_memory=8,\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand Down Expand Up @@ -77,7 +77,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
"auth.login()"
]
},
{
"cell_type": "markdown",
"id": "bc27f84c",
"metadata": {},
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -51,7 +62,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"source": [
"Once again, let's start by running through the same cluster setup as before:\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand Down Expand Up @@ -75,7 +75,7 @@
" max_cpus=2,\n",
" min_memory=8,\n",
" max_memory=8,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand All @@ -69,7 +69,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@
"auth.login()"
]
},
{
"cell_type": "markdown",
"id": "bc27f84c",
"metadata": {},
"source": [
"Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n",
"\n",
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -51,7 +62,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources\n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"source": [
"Once again, let's start by running through the same cluster setup as before:\n",
"\n",
"NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n",
"The example here is a community image."
"NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n",
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
]
},
{
Expand All @@ -67,7 +67,7 @@
" max_cpus=2,\n",
" min_memory=8,\n",
" max_memory=8,\n",
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
" # image=\"\", # Optional Field \n",
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
"))"
Expand Down

0 comments on commit 029683f

Please sign in to comment.