Phase1 skeleton: replace demo main.py with src.server contract

- Overlay ModelHub XC Phase1 (health/status, STRATEGY_ID gate, dry-run)
- Dockerfile CMD -> python -m src.server; FROM stays platform TCR base
- Remove demo main.py and requirements.txt (stdlib only)
- Add tests/, scripts/, docs/, Makefile, config/examples (no secrets)
This commit is contained in:
VC_noSugar
2026-10-16 15:47:10 +08:00
parent 26351cefee
commit 0d0f3b611a
31 changed files with 1436 additions and 106 deletions

View File

@@ -1,14 +1,18 @@
FROM modelhubxc-4pd.tencentcloudcr.com/xc_agent_platform/python:3.11-slim
ENV PYTHONUNBUFFERED=1
# ModelHub XC adaptation agent — Phase1 skeleton
# Default base MUST stay the platform image (do not swap to public mirrors).
ARG BASE_IMAGE=modelhubxc-4pd.tencentcloudcr.com/xc_agent_platform/python:3.11-slim
FROM ${BASE_IMAGE}
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy only what the runtime needs (see .dockerignore)
COPY src/ ./src/
COPY . .
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
# STRATEGY_ID and tokens are injected by the platform at run time — never bake them in.
EXPOSE 8080
CMD ["python", "main.py"]
# Start HTTP service only (no register / submit side effects)
CMD ["python", "-m", "src.server"]