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:
parent
adb46d4927
commit
869d2c41fb
@ -45,11 +45,13 @@ def ensure_image(img: str) -> None:
|
|||||||
return
|
return
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f'sandbox image {img!r} is not available: not local, and every '
|
f'沙箱镜像 {img!r} 不可用:本地没有,全部镜像源尝试失败。'
|
||||||
f'mirror failed. {str(e)[:200]}. '
|
f'{str(e)[:150]}\n'
|
||||||
'Fix: pull/build it manually (for bigcodebench the official image '
|
'需要自己加载镜像(任选其一),然后重跑加 --rescore:\n'
|
||||||
'is bigcodebench/bigcodebench-evaluate:latest), then re-run with '
|
f' A. 有外网的机器: docker pull {img} && docker save {img} | gzip > img.tgz\n'
|
||||||
'--rescore to score the cached predictions.') from e
|
f' 拷回本机后: docker load < img.tgz\n'
|
||||||
|
f' B. 本机网络恢复后: docker pull {img}\n'
|
||||||
|
'预测都在 checkpoint 里,镜像就位后纯判分即可。') from e
|
||||||
|
|
||||||
|
|
||||||
@register_sandbox('docker')
|
@register_sandbox('docker')
|
||||||
|
|||||||
@ -19,28 +19,18 @@ from ..data.dataset import Dataset
|
|||||||
# CN mirrors tried in order before/alongside the daemon's configured mirrors.
|
# 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
|
# Some namespaces (e.g. swebench/*) are blocked by individual CN mirrors, so we
|
||||||
# fall through: daemon default -> 1ms.run -> baidubce -> sjtug.
|
# fall through: daemon default -> 1ms.run -> baidubce -> sjtug.
|
||||||
# CN + international mainstream fallbacks. History on this host: daocloud
|
# Six mainstream fallbacks (trimmed from 16 per user call: the long tail
|
||||||
# (139s) and 1ms.run (342s + trickle) have delivered this 9GB image; the
|
# died anyway). History on this host: daocloud and 1ms.run have each
|
||||||
# international entries (Google's hub cache, AWS ECR public) need real
|
# delivered the 9GB bigcodebench image; the rest are the usual suspects.
|
||||||
# egress -- usually blocked here, kept for networks that have it.
|
|
||||||
_CN_MIRROR_FALLBACKS = [
|
_CN_MIRROR_FALLBACKS = [
|
||||||
'{img}', # daemon default (uses its own registry-mirrors config)
|
'{img}', # daemon default (uses its own registry-mirrors config)
|
||||||
'docker.m.daocloud.io/{img}',
|
'docker.m.daocloud.io/{img}',
|
||||||
'docker.1ms.run/{img}',
|
'docker.1ms.run/{img}',
|
||||||
'docker.1panel.live/{img}',
|
'docker.1panel.live/{img}',
|
||||||
'hub.rat.dev/{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.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} 占位)
|
# 用户/环境可整体覆盖(逗号分隔模板,{img} 占位)
|
||||||
import os as _os
|
import os as _os
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user