forked from luopingyi/xc_agent_platform_demo
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:
18
Dockerfile
18
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user