Skip to content

Commit 419ca62

Browse files
committed
adding ray num cpus
1 parent 797f9ce commit 419ca62

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎modules/api/raypi.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ async def http_exception_handler(request: Request, e: HTTPException):
211211
api_middleware(app)
212212

213213
@serve.deployment(
214-
ray_actor_options={"num_gpus": int(os.environ.get("RAY_NUM_GPUS", 0))},
214+
ray_actor_options={"num_gpus": int(os.environ.get("RAY_NUM_GPUS", 0)),
215+
"num_cpus": int(os.environ.get("RAY_NUM_CPUS", 0))
216+
},
215217
autoscaling_config={
216218
"min_replicas": int(os.environ.get("RAY_MIN_REPLICAS", 0)),
217219
"max_replicas": int(os.environ.get("RAY_MAX_REPLICAS", 0))

‎webui-user.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949

5050
###############ray############################
5151
#export RAY_NUM_GPUS=1
52+
#export RAY_NUM_CPUS=1
5253
#export RAY_MIN_REPLICAS=1
5354
#export RAY_MAX_REPLICAS=2
5455
#export RAY_PORT=7575

0 commit comments

Comments
 (0)