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
12 changes: 7 additions & 5 deletions verifiers/v1/runtimes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@

logger = logging.getLogger(__name__)

# Ensure the latest `uv` is available for our PEP 723 scripts: prefer pip on Python images,
# then fall back to the standalone installer (curl/wget), installing curl + CA certs when a
# bare image has no downloader. Both paths install to ~/.local/bin, which we prepend to PATH.
# (Needs network + one of pip / curl / wget / apt-get / apk.)
# Ensure `uv` is available for our PEP 723 scripts: keep one already on PATH (an image that
# pre-installs it, or an earlier rollout's install on the same box); otherwise prefer pip on
# Python images, then fall back to the standalone installer (curl/wget), installing curl + CA
# certs when a bare image has no downloader. Both install paths land in ~/.local/bin, which we
# prepend to PATH first. (Installing needs network + one of pip / curl / wget / apt-get / apk.)
_INSTALL_CURL = ( # only when the image has no downloader; needs a known package manager
"{ command -v curl >/dev/null 2>&1 || command -v wget >/dev/null 2>&1; } "
"|| { apt-get update -qq && apt-get install -y -qq curl ca-certificates; } "
Expand All @@ -39,7 +40,8 @@
)
_ENSURE_UV = (
'export PATH="$HOME/.local/bin:$PATH" UV_INSTALL_DIR="$HOME/.local/bin"; '
"pip install -q -U --user uv 2>/dev/null "
"command -v uv >/dev/null 2>&1 "
"|| pip install -q -U --user uv 2>/dev/null "
f"|| {{ {_INSTALL_CURL}; {_DOWNLOAD_UV}; }}"
)

Expand Down