allow demo to pass in env
This commit is contained in:
parent
fad4d69ee4
commit
8cc650847a
@ -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':
|
if cmd[0].find('/') == -1 and os.path.exists(cmd[0]) and os.name != 'nt':
|
||||||
cmd[0] = './' + cmd[0]
|
cmd[0] = './' + cmd[0]
|
||||||
cmd = ' '.join(cmd)
|
cmd = ' '.join(cmd)
|
||||||
env = {}
|
env = os.environ.copy()
|
||||||
for k, v in worker_env.items():
|
for k, v in worker_env.items():
|
||||||
env[k] = str(v)
|
env[k] = str(v)
|
||||||
env['rabit_task_id'] = str(taskid)
|
env['rabit_task_id'] = str(taskid)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user