File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010#ray.init(os.environ.get("RAY_HEAD_ADDRESS", ""))
1111#ray.init("ray://localhost:10001")
12- if "RAY_HEAD_ADDRESS" in os .environ :
13- ray .init (address = os .environ .get ("RAY_HEAD_ADDRESS" ))
12+
13+
14+ ray_head_address = os .environ .get ("RAY_HEAD_ADDRESS" )
15+ print ("RAY_HEAD_ADDRESS:" , ray_head_address )
16+
17+ if ray_head_address :
18+ ray .init (address = ray_head_address )
1419else :
1520 ray .init ()
1621
22+
1723def ray_only ():
1824 serve .shutdown ()
1925 if "RAY_DOCKER" in os .environ :
2026 print ("starting ray in docker" )
2127 serve .start (
22- detached = True ,
28+ detached = True ,
2329 http_options = {
2430 "host" : os .environ .get ("RAY_IP" , "0.0.0.0" ),
2531 "port" : int (os .environ .get ("RAY_PORT" , 8000 ))
2632 }
2733 )
28- else :
34+ else :
2935 serve .start (
3036 http_options = {
3137 "host" : os .environ .get ("RAY_IP" , "0.0.0.0" ),
You can’t perform that action at this time.
0 commit comments