swe_agentic: PIP_INDEX_URL env → tuna mirror in agent containers

pypi.org is unreachable from this host's containers; agent pip installs
hit 600s _exec timeouts and burned 4/10 samples. The env var makes pip
use tuna (~7s for the same package, verified in-container).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-18 10:42:29 +00:00
parent c7811fa774
commit b3c837d3f3

View File

@ -135,6 +135,10 @@ class SWEAgenticEnvironment(Environment):
r = _docker(['run', '-d', '--name', name, r = _docker(['run', '-d', '--name', name,
'-w', '/testbed', '-w', '/testbed',
'-e', 'PAGER=cat', '-e', 'MANPAGER=cat', '-e', 'PAGER=cat', '-e', 'MANPAGER=cat',
# CN pip mirror: pypi.org is unreachable from this
# host's containers (agent `pip install` hit 600s
# timeouts); tuna downloads the same package in ~7s
'-e', 'PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple',
'-e', 'LESS=-R', '-e', 'PIP_PROGRESS_BAR=off', '-e', 'LESS=-R', '-e', 'PIP_PROGRESS_BAR=off',
'-e', 'TQDM_DISABLE=1', '-e', 'TQDM_DISABLE=1',
image, 'tail', '-f', '/dev/null'], timeout=120) image, 'tail', '-f', '/dev/null'], timeout=120)