Skip to content

Commit 1da820c

Browse files
committed
Add GPU to ClusterConfiguration
1 parent a9b314e commit 1da820c

12 files changed

+17
-5
lines changed

demo-notebooks/additional-demos/hf_interactive.ipynb

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@
9898
" max_cpus=8, \n",
9999
" min_memory=16, \n",
100100
" max_memory=16, \n",
101-
" num_gpus=4,\n",
101+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
102+
" num_gpus=1,\n",
102103
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
103104
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
104105
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/additional-demos/local_interactive.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
" max_cpus=1,\n",
6161
" min_memory=4,\n",
6262
" max_memory=4,\n",
63+
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
6364
" num_gpus=0,\n",
6465
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
6566
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

demo-notebooks/additional-demos/ray_job_client.ipynb

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
" max_cpus=1,\n",
5252
" min_memory=4,\n",
5353
" max_memory=4,\n",
54+
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
5455
" num_gpus=0,\n",
5556
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
5657
" write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,14 @@
6161
"# Create and configure our cluster object\n",
6262
"# The SDK will try to find the name of your default local queue based on the annotation \"kueue.x-k8s.io/default-queue\": \"true\" unless you specify the local queue manually below\n",
6363
"cluster = Cluster(ClusterConfiguration(\n",
64-
" name='raytest',\n",
64+
" name='raytest', \n",
6565
" namespace='default', # Update to your namespace\n",
6666
" num_workers=2,\n",
6767
" min_cpus=1,\n",
6868
" max_cpus=1,\n",
6969
" min_memory=4,\n",
7070
" max_memory=4,\n",
71+
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7172
" num_gpus=0,\n",
7273
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
7374
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
" max_cpus=1,\n",
5151
" min_memory=4,\n",
5252
" max_memory=4,\n",
53-
" num_gpus=0,\n",
53+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
54+
" num_gpus=1,\n",
5455
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
5556
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
5657
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

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

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
" max_cpus=2,\n",
6868
" min_memory=8,\n",
6969
" max_memory=8,\n",
70+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7071
" num_gpus=1,\n",
7172
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
7273
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
" max_cpus=1,\n",
7777
" min_memory=4,\n",
7878
" max_memory=4,\n",
79+
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7980
" num_gpus=0,\n",
8081
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
8182
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
" max_cpus=1,\n",
5151
" min_memory=4,\n",
5252
" max_memory=4,\n",
53-
" num_gpus=0,\n",
53+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
54+
" num_gpus=1,\n",
5455
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
5556
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
5657
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

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

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
" max_cpus=2,\n",
7676
" min_memory=8,\n",
7777
" max_memory=8,\n",
78+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7879
" num_gpus=1,\n",
7980
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
8081
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
" max_cpus=1,\n",
6969
" min_memory=4,\n",
7070
" max_memory=4,\n",
71+
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7172
" num_gpus=0,\n",
7273
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
7374
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
" max_cpus=1,\n",
5151
" min_memory=4,\n",
5252
" max_memory=4,\n",
53-
" num_gpus=0,\n",
53+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
54+
" num_gpus=1,\n",
5455
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
5556
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources\n",
5657
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

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

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
" max_cpus=2,\n",
6868
" min_memory=8,\n",
6969
" max_memory=8,\n",
70+
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7071
" num_gpus=1,\n",
7172
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\n",
7273
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",

0 commit comments

Comments
 (0)