Skip to content

Commit d6eb739

Browse files
authored
Merge pull request #565 from NVIDIA/am/no-copies
Do not use --copies for venv creation
2 parents 169d572 + a038425 commit d6eb739

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/cloudai/systems/slurm/slurm_installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def _create_venv(self, item: PythonExecutable) -> InstallStatusResult:
263263
logging.debug(msg)
264264
return InstallStatusResult(True, msg)
265265

266-
cmd = ["python", "-m", "venv", "--copies", str(venv_path)]
266+
cmd = ["python", "-m", "venv", str(venv_path)]
267267
logging.debug(f"Creating venv using cmd: {' '.join(cmd)}")
268268
result = subprocess.run(cmd, capture_output=True, text=True)
269269
logging.debug(f"venv creation STDOUT:\n{result.stdout}\nSTDERR:\n{result.stderr}")

tests/test_slurm_installer.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ def test_venv_created(self, installer: SlurmInstaller, git: GitRepo):
188188
mock_run.return_value = CompletedProcess(args=[], returncode=0)
189189
res = installer._create_venv(py)
190190
assert res.success
191-
mock_run.assert_called_once_with(
192-
["python", "-m", "venv", "--copies", str(venv_path)], capture_output=True, text=True
193-
)
191+
mock_run.assert_called_once_with(["python", "-m", "venv", str(venv_path)], capture_output=True, text=True)
194192

195193
@pytest.mark.parametrize("failure_on_venv_creation,reqs_install_failure", [(True, False), (False, True)])
196194
def test_error_creating_venv(

0 commit comments

Comments
 (0)