# Edge AI Platform 邊緣 AI 開發平台 — 管理 AI 模型、連接邊緣裝置(Kneron KL720/KL730)、即時攝影機推論。 單一執行檔,下載即可使用。 ## Quick Start ### macOS ```bash # 安裝(下載至 ~/.edge-ai-platform) curl -fsSL https://gitea.innovedus.com/warrenchen/web_academy_prototype/raw/branch/main/scripts/install.sh | bash # 啟動(Mock 模式,不需硬體) edge-ai-server --mock --mock-devices=3 # 開啟瀏覽器 open http://127.0.0.1:3721 ``` ### Windows (PowerShell) ```powershell # 安裝 irm https://gitea.innovedus.com/warrenchen/web_academy_prototype/raw/branch/main/scripts/install.ps1 | iex # 啟動(Mock 模式) edge-ai-server.exe --mock --mock-devices=3 # 開啟瀏覽器 Start-Process http://127.0.0.1:3721 ``` ### 手動下載 從 [Releases](https://gitea.innovedus.com/warrenchen/web_academy_prototype/releases) 下載對應平台的壓縮檔: | 平台 | 檔案 | |:-----|:-----| | macOS Intel | `edge-ai-platform_vX.Y.Z_darwin_amd64.tar.gz` | | macOS Apple Silicon | `edge-ai-platform_vX.Y.Z_darwin_arm64.tar.gz` | | Windows x64 | `edge-ai-platform_vX.Y.Z_windows_amd64.zip` | 解壓後執行: ```bash # macOS tar xzf edge-ai-platform_*.tar.gz cd edge-ai-platform_*/ ./edge-ai-server --mock --mock-devices=3 # Windows: 解壓 zip,在資料夾中開啟 PowerShell .\edge-ai-server.exe --mock --mock-devices=3 ``` 然後開啟瀏覽器 http://127.0.0.1:3721 ## 命令列選項 | Flag | 預設值 | 說明 | |:-----|:------|:-----| | `--port` | `3721` | 伺服器連接埠 | | `--host` | `127.0.0.1` | 伺服器位址 | | `--mock` | `false` | 啟用模擬裝置驅動 | | `--mock-camera` | `false` | 啟用模擬攝影機 | | `--mock-devices` | `1` | 模擬裝置數量 | | `--log-level` | `info` | 日誌等級(debug/info/warn/error) | | `--dev` | `false` | 開發模式(停用嵌入式前端) | ## 可選依賴 以下工具可增強功能,但**非必要**: | 工具 | 用途 | macOS 安裝 | Windows 安裝 | |:-----|:-----|:----------|:------------| | `ffmpeg` | 攝影機擷取、影片處理 | `brew install ffmpeg` | `winget install Gyan.FFmpeg` | | `yt-dlp` | YouTube / 影片 URL 解析 | `brew install yt-dlp` | `winget install yt-dlp` | | `python3` | Kneron KL720 硬體驅動 | `brew install python3` | `winget install Python.Python.3.12` | 啟動時會自動檢查並提示缺少的工具。 ## 解除安裝 ### macOS ```bash rm -rf ~/.edge-ai-platform sudo rm -f /usr/local/bin/edge-ai-server ``` ### Windows (PowerShell) ```powershell Remove-Item -Recurse -Force "$env:LOCALAPPDATA\EdgeAIPlatform" # 手動從系統環境變數移除 PATH 中的 EdgeAIPlatform 路徑 ``` ## 開發 ```bash # 安裝依賴 make install # 啟動開發伺服器(前端 :3000 + 後端 :3721) make dev # 編譯單一 binary make build # 跨平台打包(本機測試,不發佈) make release-snapshot # 發佈至 Gitea Release make release ```