支持局域网 GPU OCR 服务,配置方式类似 Ollama。
This commit is contained in:
@@ -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}"
|
||||
Reference in New Issue
Block a user