Files
submmit/README.md

45 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2026-07-10 00:22:50 +08:00
# ModelHub Adaptation Agent
This repository is packaged for the ModelHub XC agent platform.
## Platform Contract
- Root-level `Dockerfile`
- Listens on port `8080`
- Exposes `GET /health`
- Handles `SIGTERM`
- Reads platform-provided `STRATEGY_ID` and attaches it to task submissions as `strategyId`
The root `main.py` starts a lightweight health server and runs the existing
submission poller in a child process.
## Runtime Environment
2026-07-10 00:54:26 +08:00
The image includes a single-account submission token fallback for the agent
platform. Environment variables can override it without rebuilding the image.
2026-07-10 00:22:50 +08:00
2026-07-10 00:54:26 +08:00
- `MODELHUB_XC_TOKEN`, `XC_TOKEN`, or `MODELHUB_TOKEN` for ModelHub API authentication
- `MODELHUB_JWT_TOKEN` or `JWT_TOKEN` can be used instead when the platform provides a JWT
2026-07-10 00:22:50 +08:00
- `HF_TOKEN` optional, but recommended for Hugging Face API limits
2026-07-10 00:54:26 +08:00
- `STRATEGY_ID` is expected to be injected by the ModelHub agent platform and is attached to submissions for strategy attribution; it is not an API authentication token
2026-07-10 00:22:50 +08:00
Optional tuning:
- `MODELHUB_AGENT_POLL_INTERVAL_SECONDS` default `300`
- `MODELHUB_AGENT_IDLE_INTERVAL_SECONDS` default `600`
- `MODELHUB_AGENT_POST_CYCLE_COOLDOWN_SECONDS` default `30`
- `MODELHUB_AGENT_MAX_SUBMITS_PER_RUN` default `5`
- `MODELHUB_AGENT_DAILY_TARGET`
- `MODELHUB_AGENT_MIN_DOWNLOADS`
- `MODELHUB_AGENT_GPUS`
- `MODELHUB_AGENT_EXTRA_ARGS`
## Deploy
Create a tag and submit the repository URL plus tag in "我的适配智能体".
```bash
git tag agent-v1
git push origin agent-v1
```