-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun.ps1
More file actions
32 lines (23 loc) · 853 Bytes
/
Copy pathrun.ps1
File metadata and controls
32 lines (23 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
param(
[int]$Port = 8501
)
$ErrorActionPreference = "Stop"
Write-Host "== Omni-Asset Quant Terminal Bootstrap =="
Write-Host "Project: $(Get-Location)"
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
throw "Python is not installed or not in PATH."
}
$pyVersion = python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
Write-Host "Python version: $pyVersion"
if (-not (Test-Path ".venv")) {
Write-Host "Creating virtual environment (.venv)..."
python -m venv .venv
}
Write-Host "Activating virtual environment..."
. .\.venv\Scripts\Activate.ps1
Write-Host "Upgrading pip..."
python -m pip install --upgrade pip
Write-Host "Installing dependencies..."
pip install -r requirements.txt
Write-Host "Launching Streamlit on port $Port ..."
python -m streamlit run app.py --server.port $Port