[Fix] Update dlc runner python env (#1604)

This commit is contained in:
Linchen Xiao 2024-10-14 15:50:21 +08:00 committed by GitHub
parent 4fde41036f
commit f390697a5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,7 +182,11 @@ class DLCRunner(BaseRunner):
cfg_path=param_file,
template=tmpl)
cmd = get_cmd()
# Use specified python env instead of sys.executable
if self.aliyun_cfg['python_env_path']:
cmd = cmd.replace(
sys.executable,
f'{self.aliyun_cfg["python_env_path"]}/bin/python')
logger = get_logger()
logger.debug(f'Running command: {cmd}')