Files
blackbird/_inst.sh
T
qing 49ed3f738f fix(deploy): _inst.sh 补全 ai_review/aibox/redirect80; ai_review 模型走 ModelScope 镜像
- _inst.sh: 补入遗漏的 3 个模块(confs 之后、core 之前)
- ai_review/_fetch_onnx_model.sh: 新增 chromadb onnx 模型预下载脚本
  (默认 ModelScope 镜像,支持 ONNX_MODEL_BASE_URL/CHROMA_CACHE_DIR 覆盖,
  断点续传+幂等,绕过 chromadb 写死的 AWS S3 下载)
- ai_review/_set.sh: 安装后自动调用模型下载
- README.md: 更新部署说明
- docs/reviews/DEPLOY_DEFECT_AUDIT_20260806.md: 新增部署缺陷审查报告
- docs/INDEX.md: 登记审查报告
2026-08-06 17:39:42 +00:00

45 lines
1005 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
set -euo pipefail
run_if_exists() {
local script="$1"
echo "---- run ${script} ----"
if [ -f "$script" ]; then
bash "$script"
fi
}
inst_module() {
local module="$1"
echo "======== Install ${module} ========"
local set_file="./${module}/_set.sh"
if [ -f "$set_file" ]; then
run_if_exists "$set_file"
return 0
else
echo "Failed" >&2
return 1
fi
}
inst_module "libth"
inst_module "libhttp"
inst_module "libcrypt"
inst_module "libsqlite3"
inst_module "libmsg"
inst_module "gateway"
inst_module "waf" # waf 在 gateway 之前编译,部署时由 core 先拉起 waf 再拉起 gateway
inst_module "static"
inst_module "dnfs"
inst_module "db"
inst_module "smtp"
inst_module "captcha"
inst_module "confs"
inst_module "ai_review" # 需联网拉 chromadb onnx 模型(_fetch_onnx_model.sh 走 ModelScope 镜像)
inst_module "aibox" # 需 ~/.cert/deepseek.key(见 _setenv.sh)
inst_module "redirect80" # 80 端口重定向,依赖 ../pymsg
inst_module "core" # core last