allow demo to pass in env

This commit is contained in:
tqchen 2015-03-13 22:27:36 -07:00
parent fad4d69ee4
commit 8cc650847a

View File

@ -42,7 +42,7 @@ def exec_cmd(cmd, taskid, worker_env):
if cmd[0].find('/') == -1 and os.path.exists(cmd[0]) and os.name != 'nt':
cmd[0] = './' + cmd[0]
cmd = ' '.join(cmd)
env = {}
env = os.environ.copy()
for k, v in worker_env.items():
env[k] = str(v)
env['rabit_task_id'] = str(taskid)