[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:
Ian Rodney
2020-09-13 23:40:48 -07:00
committed by GitHub
parent 660aee6311
commit 5bc2ba38fd
35 changed files with 173 additions and 45 deletions
@@ -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)