Files
it-tools-relay/Dockerfile
T
3970260761 5bea806f07 feat(mcp): MCP Streamable HTTP 端点 + 卡密授权令牌 + 调用记录
- /mcp JSON-RPC 2.0:initialize/tools/list 免鉴权,tools/call 强制 Bearer mcpt_ 令牌
- 令牌管理 GET/POST /mcp/tokens + POST action=delete,每步复验卡密授权(未授权 403)
- 调用记录 mcp_usage 表 + /admin/mcp-usage 汇总/流水
- 文件类入参 /hostfs 转换、二进制结果落盘返回下载 URL
- 修:生成令牌返回 data.token 为字符串(record 单独放 record 键)
2026-11-12 16:47:06 +08:00

20 lines
949 B
Docker

FROM python:3.10-slim-bookworm
# calibre provides ebook-convert: docx/pdf/txt/rtf/odt/epub/mobi/azw3/html interop
RUN apt-get update \
&& apt-get install -y --no-install-recommends calibre ffmpeg fonts-wqy-zenhei \
&& rm -rf /var/lib/apt/lists/*
# audio tools: Piper (local neural TTS) + faster-whisper (local ASR)
# models are pre-downloaded on the host (build env has no internet)
RUN pip install --no-cache-dir piper-tts faster-whisper
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple "rembg[cpu]"
COPY hf-cache /root/.cache/huggingface
COPY piper-models /app/piper-models
# AI 图片: u2net 抠图模型(预下载) + waifu2x-ncnn-vulkan 无损放大(CPU)
COPY ai-models/u2net.onnx /root/.u2net/u2net.onnx
COPY waifu2x/waifu2x-ncnn-vulkan-20220728-ubuntu /app/waifu2x
WORKDIR /app
COPY server.py video_ops.py audio_ops.py mcp_ops.py .
ENV HF_HOME=/root/.cache/huggingface
EXPOSE 8091
CMD ["python", "server.py"]