RapidDoc 镜像部署指南
July 12, 2026 · View on GitHub
镜像已推送至 Docker Hub
镜像构建
如果需要自己构建镜像
执行构建命令
cd docker
# 1. CPU 模式
docker build -f Dockerfile -t hzkitty/rapid-doc:0.9.9 .
# 2. GPU 模式
docker build -f DockerfileGPU -t hzkitty/rapid-doc:0.9.9-gpu .
运行部署
1. CPU 模式
仅CPU推理,资源占用较少:
docker-compose -f docker-compose.yml up -d
2. GPU 模式
docker-compose -f docker-compose-gpu.yml up -d
服务端口
- 8888: RapidDoc Web API 服务端口
API 使用
健康检查
curl http://localhost:8888/health
文档解析 API
# 上传文档进行解析
curl -X POST "http://localhost:8888/parse" \
-F "file=@document.pdf" \
-F "mode=pipeline"
配置文件详解
.env 环境变量配置文件
.env 文件用于配置服务器和系统运行参数,支持以下配置项:
基础配置
| 变量名 | 默认值 | 说明 |
|---|---|---|
API_PORT | 8888 | RapidDoc Web API 端口 |
PADDLEOCRVL_VERSION | paddleocr-vl 版本 | |
PADDLEOCRVL_VL_REC_BACKEND | paddleocr-vl backend | |
PADDLEOCRVL_VL_VL_REC_SERVER_URL | paddleocr-vl url |
系统配置
| 变量名 | 默认值 | 说明 |
|---|---|---|
STARTUP_WAIT_TIME | 15 | 启动等待时间(秒) |
LOG_LEVEL | INFO | 日志级别 |
RAPID_MODELS_DIR | /app/models | 模型文件存储目录 |