Skip to content

Commit 029683f

Browse files
Shilpa Chughopenshift-merge-bot[bot]
Shilpa Chugh
authored andcommitted
Make ray image parameter as optional
1 parent 62ce155 commit 029683f

13 files changed

+78
-33
lines changed

docs/cluster-configuration.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ cluster = Cluster(ClusterConfiguration(
1919
min_memory=2, # Default 2
2020
max_memory=2, # Default 2
2121
num_gpus=0, # Default 0
22-
image="quay.io/rhoai/ray:2.23.0-py39-cu121", # Mandatory Field
22+
# image="", # Optional Field
2323
machine_types=["m5.xlarge", "g4dn.xlarge"],
2424
labels={"exampleLabel": "example", "secondLabel": "example"},
2525
))
2626
```
27+
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.
2728

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

src/codeflare_sdk/demo-notebooks/additional-demos/hf_interactive.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
"source": [
6969
"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",
7070
"\n",
71-
"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",
72-
"The example here is a community image."
71+
"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",
72+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
7373
]
7474
},
7575
{
@@ -98,7 +98,7 @@
9898
" max_cpus=8, \n",
9999
" min_memory=16, \n",
100100
" max_memory=16, \n",
101-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
101+
" # image=\"\", # Optional Field \n",
102102
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
103103
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
104104
" ))"

src/codeflare_sdk/demo-notebooks/additional-demos/local_interactive.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"metadata": {},
3636
"source": [
3737
"\n",
38-
"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",
39-
"The example here is a community image."
38+
"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",
39+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
4040
]
4141
},
4242
{
@@ -61,7 +61,7 @@
6161
" max_cpus=1,\n",
6262
" min_memory=4,\n",
6363
" max_memory=4,\n",
64-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
64+
" # image=\"\", # Optional Field \n",
6565
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
6666
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
6767
" ))"

src/codeflare_sdk/demo-notebooks/additional-demos/ray_job_client.ipynb

+12-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
"auth.login()"
3636
]
3737
},
38+
{
39+
"cell_type": "markdown",
40+
"id": "18de2d65",
41+
"metadata": {},
42+
"source": [
43+
"\n",
44+
"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",
45+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
46+
]
47+
},
3848
{
3949
"cell_type": "code",
4050
"execution_count": null,
@@ -52,8 +62,9 @@
5262
" max_cpus=1,\n",
5363
" min_memory=4,\n",
5464
" max_memory=4,\n",
55-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
65+
" # image=\"\", # Optional Field \n",
5666
" write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
67+
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
5768
"))"
5869
]
5970
},

src/codeflare_sdk/demo-notebooks/guided-demos/0_basic_ray.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"source": [
4848
"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",
4949
"\n",
50-
"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",
51-
"The example here is a community image."
50+
"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",
51+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
5252
]
5353
},
5454
{
@@ -71,7 +71,7 @@
7171
" max_cpus=1,\n",
7272
" min_memory=4,\n",
7373
" max_memory=4,\n",
74-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
74+
" # image=\"\", # Optional Field \n",
7575
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7676
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
7777
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/1_cluster_job_client.ipynb

+12-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
"auth.login()"
3535
]
3636
},
37+
{
38+
"cell_type": "markdown",
39+
"id": "bc27f84c",
40+
"metadata": {},
41+
"source": [
42+
"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",
43+
"\n",
44+
"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",
45+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
46+
]
47+
},
3748
{
3849
"cell_type": "code",
3950
"execution_count": null,
@@ -53,7 +64,7 @@
5364
" max_cpus=1,\n",
5465
" min_memory=4,\n",
5566
" max_memory=4,\n",
56-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
67+
" # image=\"\", # Optional Field \n",
5768
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
5869
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
5970
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/2_basic_interactive.ipynb

+7-7
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"source": [
4545
"Once again, let's start by running through the same cluster setup as before:\n",
4646
"\n",
47-
"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",
48-
"The example here is a community image."
47+
"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",
48+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
4949
]
5050
},
5151
{
@@ -65,11 +65,11 @@
6565
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
6666
" num_gpus=1,\n",
6767
" num_workers=2,\n",
68-
" min_cpus='250m',\n",
69-
" max_cpus=1,\n",
70-
" min_memory=4,\n",
71-
" max_memory=6,\n",
72-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
68+
" min_cpus=2,\n",
69+
" max_cpus=2,\n",
70+
" min_memory=8,\n",
71+
" max_memory=8,\n",
72+
" # image=\"\", # Optional Field \n",
7373
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7474
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
7575
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"source": [
4848
"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",
4949
"\n",
50-
"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",
51-
"The example here is a community image."
50+
"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",
51+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
5252
]
5353
},
5454
{
@@ -77,7 +77,7 @@
7777
" max_cpus=1,\n",
7878
" min_memory=4,\n",
7979
" max_memory=4,\n",
80-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
80+
" # image=\"\", # Optional Field \n",
8181
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
8282
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
8383
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb

+12-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
"auth.login()"
3535
]
3636
},
37+
{
38+
"cell_type": "markdown",
39+
"id": "bc27f84c",
40+
"metadata": {},
41+
"source": [
42+
"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",
43+
"\n",
44+
"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",
45+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
46+
]
47+
},
3748
{
3849
"cell_type": "code",
3950
"execution_count": null,
@@ -51,7 +62,7 @@
5162
" max_cpus=1,\n",
5263
" min_memory=4,\n",
5364
" max_memory=4,\n",
54-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
65+
" # image=\"\", # Optional Field \n",
5566
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
5667
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
5768
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"source": [
4545
"Once again, let's start by running through the same cluster setup as before:\n",
4646
"\n",
47-
"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",
48-
"The example here is a community image."
47+
"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",
48+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
4949
]
5050
},
5151
{
@@ -75,7 +75,7 @@
7575
" max_cpus=2,\n",
7676
" min_memory=8,\n",
7777
" max_memory=8,\n",
78-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
78+
" # image=\"\", # Optional Field \n",
7979
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
8080
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
8181
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"source": [
4848
"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",
4949
"\n",
50-
"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",
51-
"The example here is a community image."
50+
"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",
51+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
5252
]
5353
},
5454
{
@@ -69,7 +69,7 @@
6969
" max_cpus=1,\n",
7070
" min_memory=4,\n",
7171
" max_memory=4,\n",
72-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
72+
" # image=\"\", # Optional Field \n",
7373
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7474
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
7575
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/preview_nbs/1_cluster_job_client.ipynb

+12-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
"auth.login()"
3535
]
3636
},
37+
{
38+
"cell_type": "markdown",
39+
"id": "bc27f84c",
40+
"metadata": {},
41+
"source": [
42+
"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",
43+
"\n",
44+
"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",
45+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
46+
]
47+
},
3748
{
3849
"cell_type": "code",
3950
"execution_count": null,
@@ -51,7 +62,7 @@
5162
" max_cpus=1,\n",
5263
" min_memory=4,\n",
5364
" max_memory=4,\n",
54-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
65+
" # image=\"\", # Optional Field \n",
5566
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources\n",
5667
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
5768
"))"

src/codeflare_sdk/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"source": [
4545
"Once again, let's start by running through the same cluster setup as before:\n",
4646
"\n",
47-
"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",
48-
"The example here is a community image."
47+
"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",
48+
"If you have your own Ray image which suits your purposes, specify it in image field to override the default image."
4949
]
5050
},
5151
{
@@ -67,7 +67,7 @@
6767
" max_cpus=2,\n",
6868
" min_memory=8,\n",
6969
" max_memory=8,\n",
70-
" image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n",
70+
" # image=\"\", # Optional Field \n",
7171
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7272
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",
7373
"))"

0 commit comments

Comments
 (0)