mirror of
https://github.com/wassname/ray.git
synced 2026-07-06 05:16:30 +08:00
[docker] Detect CPUs in container correctly (#10507)
Co-authored-by: simon-mo <simon.mo@hey.com> Co-authored-by: Richard Liaw <rliaw@berkeley.edu> Co-authored-by: Alex Wu <itswu.alex@gmail.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
# yapf: disable
|
||||
import ray
|
||||
# __doc_import_begin__
|
||||
from ray import serve
|
||||
|
||||
@@ -70,6 +71,7 @@ class BoostingModel:
|
||||
|
||||
# __doc_define_servable_end__
|
||||
|
||||
ray.init(num_cpus=8)
|
||||
# __doc_deploy_begin__
|
||||
client = serve.start()
|
||||
client.create_backend("lr:v1", BoostingModel)
|
||||
|
||||
Reference in New Issue
Block a user