zizi 9e6f1c4481 R2 改造交付:新版模块化单体全量成果
- src/muse 新版全模块(装配/共享/上下文/任务运行/作品规划/故事世界/正文写作/审校修订/知识方法/作者经验/效果评测/交付连载/资料研究/正式变更/元数据/接入/基础设施/编排)+ 测试树(单元/契约/集成/架构/迁移/端到端/夹具)
- 129 项功能全部实现与自动验证(功能覆盖.json/矩阵),含 W31 补齐的规则与代价/节奏安排/伏笔与承诺
- 旧实现按处置清单退出(702 条中 324 删,保护合同与未迁移条目留存有据);web/app.py 旧工作台退役,新工作台为唯一写入口
- 数据库/旧库迁移:真实旧库内容批次迁移链(端点守卫/PG作品正文映射/质量资产缺省投影)
- 运行手册 docs/运行手册.md;W30 本机服务阶段一已运行(infra PG 为正式内容权威)
- R2 执行证据与私有运行材料在 .agents.local/改造/R2-20260909/(不入库)
2026-09-15 12:47:42 +08:00

36 lines
1.7 KiB
Docker
Raw Permalink 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.

# 构建上下文为构建发布工具产出的允许清单,不复制整个源码工作树。
# 基础镜像由发布清单的摘要及本地镜像ID核对;不使用隐式latest。
ARG PYTHON_IMAGE=python:3.12-slim-bookworm@sha256:9c47360a2a0355e2da18516d0b1c2126ec22c195d2185e97347c9d98398c5bef
ARG NODE_IMAGE=node:24.15.0-bookworm-slim@sha256:152aceace5c03e2597988763165ee33e3fd3633636db0fc983cd2e126b02cfde
FROM ${NODE_IMAGE} AS node
FROM ${PYTHON_IMAGE} AS runtime
USER root
COPY --from=node /usr/local/bin/node /usr/local/bin/node
COPY --from=node /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm
COPY Pi/package.json Pi/package-lock.json /opt/muse-pi/
RUN node /usr/local/lib/node_modules/npm/bin/npm-cli.js ci \
--prefix /opt/muse-pi --omit=dev --no-audit --no-fund \
--https-proxy "${HTTPS_PROXY:-}" --fetch-retries=1 --fetch-timeout=20000 --loglevel=verbose \
&& node /opt/muse-pi/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js --version
COPY requirements.txt /tmp/requirements.txt
COPY wheels/*.whl /tmp/wheels/
COPY SHA256SUMS /tmp/SHA256SUMS
COPY 发布清单.json /opt/muse-release.json
RUN cd /tmp && sha256sum -c SHA256SUMS \
&& python -m venv /opt/muse \
&& /opt/muse/bin/pip install --no-cache-dir --require-hashes -r requirements.txt \
&& /opt/muse/bin/pip install --no-cache-dir --no-deps /tmp/wheels/*.whl \
&& rm -rf /tmp/wheels /tmp/requirements.txt /tmp/SHA256SUMS
RUN useradd --uid 10001 --create-home --shell /usr/sbin/nologin muse \
&& mkdir -p /var/lib/muse/raw /var/lib/muse/drafts \
&& chown -R 10001:10001 /var/lib/muse
USER 10001:10001
WORKDIR /var/lib/muse
EXPOSE 8080
STOPSIGNAL SIGTERM
ENTRYPOINT ["/opt/muse/bin/python", "-I", "-m", "muse"]
CMD ["服务", "/etc/muse/app.toml"]