Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions verifiers/envs/python_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def ensure_fifo(path: str) -> None:

rm -f "$command_fifo" "$response_fifo" "$ready_flag"

pip install -q {pip_install_packages}
{pip_install_command}

python - <<'PY'
import base64
Expand Down Expand Up @@ -157,6 +157,11 @@ def __init__(
max_startup_wait_seconds: int = 30,
**kwargs: Any,
) -> None:
pip_install_command = (
f"pip install -q {pip_install_packages}"
if pip_install_packages.strip()
else ""
)
start_command = self._START_COMMAND_TEMPLATE.format(
command_fifo=self._COMMAND_FIFO,
response_fifo=self._RESPONSE_FIFO,
Expand All @@ -169,7 +174,7 @@ def __init__(
ready_flag=self._READY_FLAG,
).encode("utf-8")
).decode("utf-8"),
pip_install_packages=pip_install_packages,
pip_install_command=pip_install_command,
)
self.max_startup_wait_seconds = max_startup_wait_seconds
super().__init__(
Expand Down
Loading