支持局域网 GPU OCR 服务,配置方式类似 Ollama。

This commit is contained in:
dekun
2026-06-28 14:16:06 +08:00
parent 14bf314544
commit ff0c103dc5
19 changed files with 305 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")" && pwd)"
VENV="${ROOT}/.venv"
HOST="${OCR_HOST:-0.0.0.0}"
PORT="${OCR_PORT:-23567}"
if [[ ! -d "${VENV}" ]]; then
echo "未找到虚拟环境,请先运行: bash install.sh"
exit 1
fi
# shellcheck disable=SC1091
source "${VENV}/bin/activate"
cd "${ROOT}"
exec uvicorn app:app --host "${HOST}" --port "${PORT}"