Files
xc_validation_strategy_gguf/README.md

31 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# xc_validation_strategy_gguf
本版本为纯下载策略:使用 `zhoushasha` 账号批量创建 `main.py` 中未注释的 GGUF 模型下载任务(最大并发 8),不提交验证任务;之后保持 HTTP 服务存活供平台探活。
## 功能
- 启动时登录 ModelHub 获取新 Token,并检查账号身份及有效期;登录失败时停止,不回退到过期 Token
- 按流水线批量创建 GGUF 模型下载任务(HuggingFace 源,最大并发 8)
- 当前 `DOWNLOAD_ONLY=True`,不调用验证任务提交接口;验证任务由其他策略负责
- 下载成功的模型 ID 写入 `downloaded_success_models.txt`
- 暴露 `/health` 和 `/status` 接口满足平台运行时契约
## 项目结构
```
.
├── main.py # 主入口:HTTP 服务 + 纯下载流程
├── Dockerfile # 平台镜像构建配置
├── requirements.txt # Python 依赖
└── downloaded_success_models.txt # 运行后自动生成,记录下载成功的模型
```
## 平台契约说明
本项目满足平台对策略镜像的全部必要约束:
- Dockerfile 位于仓库根目录,基于官方轻量基础镜像
- 暴露 8080 端口并实现 `GET /health`
- 通过环境变量 `STRATEGY_ID` 获取策略 ID
- 正确处理 `SIGTERM` 信号,支持优雅停机