feat: add pcf analysis web app and api

This commit is contained in:
2026-06-30 14:29:02 +08:00
commit e600a73e48
44 changed files with 12412 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
$WheelDir = Join-Path $Root "vendor\wheels"
$Req = Join-Path $Root "requirements.txt"
New-Item -ItemType Directory -Force -Path $WheelDir | Out-Null
python -m pip download -r $Req -d $WheelDir
Write-Host "依赖包已下载到 $WheelDir"
+19
View File
@@ -0,0 +1,19 @@
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
$Venv = Join-Path $Root ".venv"
$Python = "python"
if (-not (Test-Path $Venv)) {
& $Python -m venv $Venv
}
$VenvPython = Join-Path $Venv "Scripts\python.exe"
$WheelDir = Join-Path $Root "vendor\wheels"
$Req = Join-Path $Root "requirements.txt"
if (-not (Test-Path $WheelDir)) {
throw "未找到离线依赖目录:$WheelDir。请先在联网环境运行 scripts\download_wheels.ps1。"
}
& $VenvPython -m pip install --no-index --find-links $WheelDir -r $Req
Write-Host "安装完成。运行 scripts\run.ps1 启动服务。"
+8
View File
@@ -0,0 +1,8 @@
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
$VenvPython = Join-Path $Root ".venv\Scripts\python.exe"
if (-not (Test-Path $VenvPython)) {
throw "未找到虚拟环境。请先运行 scripts\install_offline.ps1。"
}
Set-Location $Root
& $VenvPython -m uvicorn app.main:app --host 127.0.0.1 --port 7001