Mirror chain trimmed to 6 mainstream sources; manual-load guidance

16 -> 6 (daemon default, daocloud, 1ms.run, 1panel, rat.dev, ustc):
the long tail never delivered anyway. All-6 failure now prints an
explicit self-load recipe (save/load via an egress machine, or pull
when the network recovers) instead of a terse RuntimeError.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-17 05:53:09 +00:00
parent adb46d4927
commit 869d2c41fb
2 changed files with 11 additions and 19 deletions

View File

@ -45,11 +45,13 @@ def ensure_image(img: str) -> None:
return
except RuntimeError as e:
raise RuntimeError(
f'sandbox image {img!r} is not available: not local, and every '
f'mirror failed. {str(e)[:200]}. '
'Fix: pull/build it manually (for bigcodebench the official image '
'is bigcodebench/bigcodebench-evaluate:latest), then re-run with '
'--rescore to score the cached predictions.') from e
f'沙箱镜像 {img!r} 不可用:本地没有,全部镜像源尝试失败。'
f'{str(e)[:150]}\n'
'需要自己加载镜像(任选其一),然后重跑加 --rescore\n'
f' A. 有外网的机器: docker pull {img} && docker save {img} | gzip > img.tgz\n'
f' 拷回本机后: docker load < img.tgz\n'
f' B. 本机网络恢复后: docker pull {img}\n'
'预测都在 checkpoint 里,镜像就位后纯判分即可。') from e
@register_sandbox('docker')

View File

@ -19,28 +19,18 @@ from ..data.dataset import Dataset
# CN mirrors tried in order before/alongside the daemon's configured mirrors.
# Some namespaces (e.g. swebench/*) are blocked by individual CN mirrors, so we
# fall through: daemon default -> 1ms.run -> baidubce -> sjtug.
# CN + international mainstream fallbacks. History on this host: daocloud
# (139s) and 1ms.run (342s + trickle) have delivered this 9GB image; the
# international entries (Google's hub cache, AWS ECR public) need real
# egress -- usually blocked here, kept for networks that have it.
# Six mainstream fallbacks (trimmed from 16 per user call: the long tail
# died anyway). History on this host: daocloud and 1ms.run have each
# delivered the 9GB bigcodebench image; the rest are the usual suspects.
_CN_MIRROR_FALLBACKS = [
'{img}', # daemon default (uses its own registry-mirrors config)
'docker.m.daocloud.io/{img}',
'docker.1ms.run/{img}',
'docker.1panel.live/{img}',
'hub.rat.dev/{img}',
'docker.xuanyuan.me/{img}',
'dockerhub.icu/{img}',
'dockerproxy.com/{img}',
'hub-mirror.c.163.com/{img}',
'mirror.baidubce.com/{img}',
'docker.mirrors.ustc.edu.cn/{img}',
'docker.mirrors.sjtug.sjtu.edu.cn/{img}',
'docker.nju.edu.cn/{img}',
'docker.mirrors.tuna.tsinghua.edu.cn/{img}',
'mirror.gcr.io/{img}', # Google's docker-hub cache (intl)
'public.ecr.aws/docker/{img}', # AWS ECR public (library/* coverage)
]
# 用户/环境可整体覆盖(逗号分隔模板,{img} 占位)
import os as _os