ai-time-machine / scripts /run_modal_audio_runtime.ps1
manikandanj's picture
Prepare AI Time Machine hackathon Space
5862322 verified
Raw
History Blame Contribute Delete
656 Bytes
$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
Set-Location $root
$modalExe = Join-Path $root ".runtime-venv\Scripts\modal.exe"
if (-not (Test-Path $modalExe)) {
$modalExe = Join-Path $root ".venv\Scripts\modal.exe"
}
if (-not (Test-Path $modalExe)) {
throw "Modal CLI was not found. Install with: .\.runtime-venv\Scripts\python.exe -m pip install -e `".[modal]`""
}
$env:MODAL_PROFILE = if ($env:MODAL_PROFILE) { $env:MODAL_PROFILE } else { "manikandanj" }
$env:PYTHONUTF8 = "1"
$env:PYTHONIOENCODING = "utf-8"
$env:TTY_COMPATIBLE = "0"
& $modalExe serve (Join-Path $root "scripts\modal_audio.py")