File tree Expand file tree Collapse file tree 7 files changed +16
-18
lines changed
ray-operator/config/samples Expand file tree Collapse file tree 7 files changed +16
-18
lines changed Original file line number Diff line number Diff line change 1313 spec :
1414 containers :
1515 - name : ray-head
16- image : rayproject/ray:2.46.0
16+ image : rayproject/ray:2.46.0-py310
1717 imagePullPolicy : IfNotPresent
1818 resources :
1919 limits :
5757 spec :
5858 containers :
5959 - name : ray-worker
60- image : rayproject/ray:2.46.0
60+ image : rayproject/ray:2.46.0-py310
6161 imagePullPolicy : IfNotPresent
6262 resources :
6363 limits :
Original file line number Diff line number Diff line change 1010 spec :
1111 containers :
1212 - name : ray-head
13- image : rayproject/ray:2.46.0
13+ image : rayproject/ray:2.46.0-py310
1414 imagePullPolicy : IfNotPresent
1515 resources :
1616 limits :
4141 spec :
4242 containers :
4343 - name : ray-worker
44- image : rayproject/ray:2.46.0
44+ image : rayproject/ray:2.46.0-py310
4545 imagePullPolicy : IfNotPresent
4646 resources :
4747 limits :
Original file line number Diff line number Diff line change 1010 spec :
1111 containers :
1212 - name : ray-head
13- image : rayproject/ray:2.46.0
13+ image : rayproject/ray:2.46.0-py310
1414 imagePullPolicy : IfNotPresent
1515 resources :
1616 limits :
4141 spec :
4242 containers :
4343 - name : ray-worker
44- image : rayproject/ray:2.46.0
44+ image : rayproject/ray:2.46.0-py310
4545 imagePullPolicy : IfNotPresent
4646 resources :
4747 limits :
Original file line number Diff line number Diff line change 77 runtimeEnvYAML : |
88 working_dir: "https://github.com/ray-project/kuberay/archive/master.zip"
99 pip:
10- - jax[tpu]==0.4.33
10+ - jax[tpu]==0.6.1
1111 - -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
1212 rayClusterSpec :
1313 rayVersion : ' 2.46.0'
1717 spec :
1818 containers :
1919 - name : ray-head
20- image : rayproject/ray:2.46.0
20+ image : rayproject/ray:2.46.0-py310
2121 ports :
2222 - containerPort : 6379
2323 name : gcs-server
4747 runAsUser : 0
4848 containers :
4949 - name : ray-worker
50- image : rayproject/ray:2.46.0
50+ image : rayproject/ray:2.46.0-py310
5151 resources :
5252 limits :
5353 cpu : " 24"
Original file line number Diff line number Diff line change 1717 spec :
1818 containers :
1919 - name : ray-head
20- image : rayproject/ray:2.46.0
20+ image : rayproject/ray:2.46.0-py310
2121 ports :
2222 - containerPort : 6379
2323 name : gcs-server
4646 spec :
4747 containers :
4848 - name : ray-worker
49- image : rayproject/ray:2.46.0
49+ image : rayproject/ray:2.46.0-py310
5050 resources :
5151 limits :
5252 cpu : " 24"
Original file line number Diff line number Diff line change 77 runtimeEnvYAML : |
88 working_dir: "https://github.com/ray-project/kuberay/archive/master.zip"
99 pip:
10- - jax[tpu]==0.4.33
10+ - jax[tpu]==0.6.1
1111 - -f https://storage.googleapis.com/jax-releases/libtpu_releases.html
1212 rayClusterSpec :
1313 rayVersion : ' 2.46.0'
1717 spec :
1818 containers :
1919 - name : ray-head
20- image : rayproject/ray:2.46.0
20+ image : rayproject/ray:2.46.0-py310
2121 ports :
2222 - containerPort : 6379
2323 name : gcs-server
4545 runAsUser : 0
4646 containers :
4747 - name : ray-worker
48- image : rayproject/ray:2.46.0
48+ image : rayproject/ray:2.46.0-py310
4949 resources :
5050 limits :
5151 cpu : " 24"
Original file line number Diff line number Diff line change 11import os
22import ray
33import jax
4- import time
54
65from jax .experimental import multihost_utils
76
109@ray .remote (resources = {"TPU" : 4 })
1110def tpu_cores ():
1211 multihost_utils .sync_global_devices ("sync" )
13- cores = "TPU cores:" + str (jax .device_count ())
14- print ("TPU Worker: " + os .environ .get ("TPU_WORKER_ID" ))
15- return cores
12+ print (f"TPU Worker: { os .environ .get ('TPU_WORKER_ID' )} " )
13+ return f"TPU cores: { jax .device_count ()} "
1614
1715num_workers = int (ray .available_resources ()["TPU" ]) // 4
1816print (f"Number of TPU Workers: { num_workers } " )
You can’t perform that action at this time.
0 commit comments