23 lines
1.2 KiB
Docker
23 lines
1.2 KiB
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]"
|
|
# AI 换脸: insightface(纯Python wheel 免编译) + buffalo_l人脸检测 + inswapper_128换脸模型(宿主已预置)
|
|
RUN pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple insightface
|
|
COPY hf-cache /root/.cache/huggingface
|
|
COPY face-models /app/face-models
|
|
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"]
|