Download Dockerfile from AlexTransformer/paddleocr-mcp-server: direct link, hf CLI and curl.
- Browser
- Download file 644 Bytes
-
https://huggingface.co/spaces/AlexTransformer/paddleocr-mcp-server/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AlexTransformer/paddleocr-mcp-server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AlexTransformer/paddleocr-mcp-server/resolve/main/Dockerfile
644 Bytes
| # 使用官方 Python 轻量镜像 | |
| FROM python:3.10-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 1. 安装系统依赖和 uv (用于快速安装 python 包) | |
| RUN apt-get update && apt-get install -y git curl && \ | |
| pip install --no-cache-dir uv | |
| # 2. 安装 Python 依赖 | |
| # - fastapi, uvicorn, sse-starlette: 用于构建 Web 服务器 | |
| # - paddleocr-mcp: 你的核心 OCR 工具包 | |
| RUN uv pip install --system fastapi uvicorn sse-starlette paddleocr-mcp | |
| # 3. 复制服务器代码 | |
| COPY server.py . | |
| # 4. 暴露端口 (Hugging Face 默认端口) | |
| EXPOSE 7860 | |
| # 5. 启动服务 | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |