mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-02-16 15:55:08 +08:00
[https://nvbugs/5821433][fix] WAR for popen in QA env (#10989)
Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
This commit is contained in:
parent
5f8b1b8cbb
commit
1524c172a4
@ -147,14 +147,14 @@ def _run_worker(model_name,
|
||||
env = os.environ.copy()
|
||||
log_file = None
|
||||
log_path = None
|
||||
stdout = None
|
||||
stderr = None
|
||||
if save_log:
|
||||
log_path = os.path.join(work_dir, f"worker_{role}_{port}.log")
|
||||
log_file = open(log_path, "w+")
|
||||
stdout = log_file
|
||||
stderr = log_file
|
||||
else:
|
||||
stdout = sys.stdout
|
||||
stderr = sys.stderr
|
||||
|
||||
if device != -1:
|
||||
env["CUDA_VISIBLE_DEVICES"] = str(device)
|
||||
print(f"Running {role} on port {port}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user