Files
environment/README.md
T

130 lines
4.0 KiB
Markdown
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.
# Momentry 安裝包
## 快速安裝
```bash
cd ~/momentry_installer
./install.sh
```
## 選項
| 選項 | 說明 |
|------|------|
| `--target-dir=DIR` | 指定安裝目錄 (預設: ~/momentry) |
| `--no-db` | 跳過資料庫安裝/初始化 |
| `--no-models` | 跳過模型下載 |
## 目錄結構
```
momentry_installer/
├── install.sh ← 安裝腳本
├── README.md ← 此文檔
├── bin/ ← 核心二進制 (186 MB)
│ ├── momentry ← API Server + Worker (47 MB)
│ ├── markbase-core ← 檔案管理 (18 MB)
│ ├── markbaseengine ← LLM wrapper (5.5 MB)
│ ├── sftpgo ← SFTP 服務 (88 MB)
│ ├── llama-server ← LLM 推理 (17 MB)
│ ├── momentry-proxy ← Tauri 代理 (8 MB)
│ ├── swift_face ← 人臉檢測 (1.6 MB)
│ ├── swift_ocr ← OCR 檢測 (1.5 MB)
│ └── serve_frontend.py ← 前端服務器
├── tools/ ← Rust 處理器 (84 MB)
│ └── cli/rust/target/release/
│ ├── rust_whisper_rs ← ASR
│ ├── rust_asr_asrx ← ASR+ASRX
│ ├── rust_asrx ← 說話人識別
│ ├── rust_cut ← 場景切分
│ ├── rust_face_cluster ← 人臉聚類
│ ├── rust_scene_vlm ← 場景描述
│ ├── rust_store_traced_faces ← 人臉追蹤
│ ├── rust_register ← 註冊工具
│ └── rust_unregister ← 註銷工具
├── processors/ ← Swift 處理器 (14 MB)
│ ├── asr_swift
│ ├── asrx_swift
│ ├── facenet_embedding
│ ├── swift_face
│ ├── swift_ocr
│ ├── swift_pose
│ ├── swift_face_pose
│ ├── swift_hand
│ └── swift_appearance_expansion
├── config/ ← 配置檔案
├── scripts/ ← Python/Shell 腳本 (627 MB)
├── dist/ ← 前端 SPA (3.4 MB)
├── etc/ ← 服務配置 (21 MB)
├── launchd/ ← macOS 服務定義
├── sql/ ← 資料庫遷移
└── docs/ ← 文檔
```
## 系統需求
| 項目 | 要求 |
|------|------|
| CPU | Apple Silicon (M1/M2/M3/M4) |
| RAM | ≥ 32 GB (建議 64 GB) |
| 磁碟 | ≥ 50 GB (不含模型) |
| macOS | ≥ 14.0 |
## 服務端口
| 服務 | 端口 | 說明 |
|------|------|------|
| Momentry API | 3002 | 核心 REST API |
| Frontend Proxy | 8888 | SPA + API 代理 |
| MarkBase | 11438 | 檔案管理 |
| MarkBaseEngine | 8082 | LLM 封裝 |
| Chat LLM | 8080 | 文字生成 |
| Embedding | 11436 | 向量嵌入 |
| SFTPGo | 2022/8081/8090 | 檔案上傳 |
| PostgreSQL | 5432 | 主要資料庫 |
| Redis | 6379 | 快取/佇列 |
| Qdrant | 6333 | 向量資料庫 |
## 預設帳號
| 服務 | User | Pass |
|------|------|------|
| Web UI | demo | demo123 |
| Admin | admin | admin123 |
## 安裝後
```bash
# 啟動所有服務
for f in ~/Library/LaunchAgents/com.momentry.*.plist; do
launchctl bootstrap gui/$(id -u)/ $f 2>/dev/null
done
# 檢查服務狀態
curl http://localhost:3002/health
curl http://localhost:8888/
curl http://localhost:11438/api/v2/health
```
## 已知問題
| 問題 | 狀態 | 解決方法 |
|------|------|---------|
| admin 密碼重置 | ⚠️ | 使用 demo/demo123 登入,或在 Admin UI 創建新管理員 |
| Re-scan command queue | ⚠️ | 需要重新編譯 momentry worker 二進制 |
| /health 需要 API key | ℹ️ | 正常行為,使用 `X-API-Key` header |
## 預設帳號
| 帳號 | 密碼 | 權限 |
|------|------|------|
| demo | demo123 | user (完整功能) |
| admin | (需重置) | admin |
## 安裝後 admin 密碼重置方法
1. 使用 demo/demo123 登入
2. 進入 Admin → Users
3. 建立新帳號並設定 admin 角色
4. 或使用資料庫直接更新 (需要 argon2 哈希)