From 49f573d99d38ee89d82b28e6a1c65cc33ff3a749 Mon Sep 17 00:00:00 2001 From: Dimitri Saridakis Date: Thu, 9 Nov 2023 10:24:20 +0000 Subject: [PATCH] refactor: update demo notebooks to use default raycluster image in demo nbs --- .../additional-demos/hf_interactive.ipynb | 4 +++- .../additional-demos/local_interactive.ipynb | 13 ++++++++++++- demo-notebooks/guided-demos/0_basic_ray.ipynb | 6 ++++-- .../guided-demos/1_basic_instascale.ipynb | 5 ++++- demo-notebooks/guided-demos/2_basic_jobs.ipynb | 5 ++++- .../guided-demos/3_basic_interactive.ipynb | 5 ++++- demo-notebooks/guided-demos/4_gpt.ipynb | 9 +++++++++ 7 files changed, 40 insertions(+), 7 deletions(-) diff --git a/demo-notebooks/additional-demos/hf_interactive.ipynb b/demo-notebooks/additional-demos/hf_interactive.ipynb index a6780a8f8..40c68d3eb 100644 --- a/demo-notebooks/additional-demos/hf_interactive.ipynb +++ b/demo-notebooks/additional-demos/hf_interactive.ipynb @@ -69,7 +69,9 @@ "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 AppWrapper)." + "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 AppWrapper).\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 but we have a community image available for you to use if you wish." ] }, { diff --git a/demo-notebooks/additional-demos/local_interactive.ipynb b/demo-notebooks/additional-demos/local_interactive.ipynb index 7533db3d8..3dbd4858b 100644 --- a/demo-notebooks/additional-demos/local_interactive.ipynb +++ b/demo-notebooks/additional-demos/local_interactive.ipynb @@ -44,7 +44,18 @@ "cluster_name = \"hfgputest-1\"\n", "local_interactive = True\n", "\n", - "cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive, namespace=namespace, name=cluster_name, num_workers=1, min_cpus=1, max_cpus=1, min_memory=4, max_memory=4, num_gpus=0, instascale=False, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))" + "cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive,\n", + " namespace=namespace,\n", + " name=cluster_name,\n", + " num_workers=1,\n", + " min_cpus=1,\n", + " max_cpus=1,\n", + " min_memory=4,\n", + " max_memory=4,\n", + " num_gpus=0,\n", + " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n", + " instascale=False,\n", + " machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))" ] }, { diff --git a/demo-notebooks/guided-demos/0_basic_ray.ipynb b/demo-notebooks/guided-demos/0_basic_ray.ipynb index d37b7d7d0..ec48d27ff 100644 --- a/demo-notebooks/guided-demos/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/0_basic_ray.ipynb @@ -46,7 +46,9 @@ "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 AppWrapper)." + "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 AppWrapper).\n", + "\n", + "We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish." ] }, { @@ -191,7 +193,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.9.18" }, "vscode": { "interpreter": { diff --git a/demo-notebooks/guided-demos/1_basic_instascale.ipynb b/demo-notebooks/guided-demos/1_basic_instascale.ipynb index d0faf5b9b..05a1ba317 100644 --- a/demo-notebooks/guided-demos/1_basic_instascale.ipynb +++ b/demo-notebooks/guided-demos/1_basic_instascale.ipynb @@ -43,7 +43,9 @@ "id": "bc27f84c", "metadata": {}, "source": [ - "This time, we are working in a cloud environment, and our OpenShift cluster does not have the resources needed for our desired workloads. We will use InstaScale to dynamically scale-up guaranteed resources based on our request (that will also automatically scale-down when we are finished working):" + "This time, we are working in a cloud environment, and our OpenShift cluster does not have the resources needed for our desired workloads. We will use InstaScale to dynamically scale-up guaranteed resources based on our request (that will also automatically scale-down when we are finished working):\n", + "\n", + "We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish." ] }, { @@ -63,6 +65,7 @@ " min_memory=8,\n", " max_memory=8,\n", " num_gpus=1,\n", + " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n", " instascale=True, # InstaScale now enabled, will scale OCP cluster to guarantee resource request\n", " machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"] # Head, worker AWS machine types desired\n", "))" diff --git a/demo-notebooks/guided-demos/2_basic_jobs.ipynb b/demo-notebooks/guided-demos/2_basic_jobs.ipynb index da74f9e54..7e5b1e1a2 100644 --- a/demo-notebooks/guided-demos/2_basic_jobs.ipynb +++ b/demo-notebooks/guided-demos/2_basic_jobs.ipynb @@ -43,7 +43,9 @@ "id": "bc27f84c", "metadata": {}, "source": [ - "Let's start by running through the same cluster setup as before:" + "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 but we have a community image available for you to use if you wish." ] }, { @@ -63,6 +65,7 @@ " min_memory=4,\n", " max_memory=4,\n", " num_gpus=0,\n", + " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n", " instascale=False\n", "))" ] diff --git a/demo-notebooks/guided-demos/3_basic_interactive.ipynb b/demo-notebooks/guided-demos/3_basic_interactive.ipynb index c8b2b1a0e..5b48fa18f 100644 --- a/demo-notebooks/guided-demos/3_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/3_basic_interactive.ipynb @@ -43,7 +43,9 @@ "id": "bc27f84c", "metadata": {}, "source": [ - "Once again, let's start by running through the same cluster setup as before:" + "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 but we have a community image available for you to use if you wish." ] }, { @@ -63,6 +65,7 @@ " min_memory=8,\n", " max_memory=8,\n", " num_gpus=1,\n", + " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n", " instascale=True, #<---instascale enabled\n", " machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"]\n", " \n", diff --git a/demo-notebooks/guided-demos/4_gpt.ipynb b/demo-notebooks/guided-demos/4_gpt.ipynb index 0fdcec965..5bbcc493a 100644 --- a/demo-notebooks/guided-demos/4_gpt.ipynb +++ b/demo-notebooks/guided-demos/4_gpt.ipynb @@ -30,6 +30,14 @@ "auth.login()" ] }, + { + "cell_type": "markdown", + "id": "8f4b200f", + "metadata": {}, + "source": [ + "NOTE: We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish." + ] + }, { "cell_type": "code", "execution_count": null, @@ -46,6 +54,7 @@ " min_memory=8,\n", " max_memory=8,\n", " num_gpus=1,\n", + " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n", " instascale=True, #<---instascale enabled\n", " machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"],\n", "))"