Start processes using the same version of Python that was used to start Ray. (#760)

* Make local scheduler start workers using the same version of Python that was used to start the local scheduler.

* Use current version of python to start new processes instead of hardcoded python executable.

* Fix linting.
This commit is contained in:
Robert Nishihara
2017-07-21 00:05:10 +00:00
committed by Philipp Moritz
parent c31c20ca9c
commit 13000b7503
3 changed files with 12 additions and 7 deletions
@@ -5,6 +5,7 @@ from __future__ import print_function
import os
import random
import subprocess
import sys
import time
@@ -81,13 +82,14 @@ def start_local_scheduler(plasma_store_name,
assert plasma_store_name is not None
assert plasma_manager_name is not None
assert redis_address is not None
start_worker_command = ("python {} "
start_worker_command = ("{} {} "
"--node-ip-address={} "
"--object-store-name={} "
"--object-store-manager-name={} "
"--local-scheduler-name={} "
"--redis-address={}"
.format(worker_path,
.format(sys.executable,
worker_path,
node_ip_address,
plasma_store_name,
plasma_manager_name,