Skip to content

Commit

Permalink
Always stop the webserver when executing pip
Browse files Browse the repository at this point in the history
- It seems to want lots of memory
  • Loading branch information
virtuald committed Jan 17, 2024
1 parent 52ead32 commit 7b51b23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions robotpy_installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,9 @@ def pip_install(
else:
pip_args.append(package)

# pip is greedy
self.ensure_more_memory()

try:
self.ssh.exec_cmd(shlex.join(pip_args), check=True, print_output=True)
except SshExecError as e:
Expand All @@ -593,6 +596,9 @@ def pip_install(
def pip_list(self):
self.ensure_robot_pip()

# pip is greedy
self.ensure_more_memory()

with catch_ssh_error("pip3 list"):
self.ssh.exec_cmd(
f"{_PIP_STUB_PATH} --no-cache-dir --disable-pip-version-check list",
Expand All @@ -618,6 +624,9 @@ def pip_uninstall(
]
pip_args.extend(packages)

# pip is greedy
self.ensure_more_memory()

with catch_ssh_error("uninstalling packages"):
self.ssh.exec_cmd(shlex.join(pip_args), check=True, print_output=True)

Expand Down

0 comments on commit 7b51b23

Please sign in to comment.