mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
feat: add devcontainer based setup docs
This commit is contained in:
parent
1eb6c534d8
commit
c4df866bcf
10 changed files with 311 additions and 125 deletions
|
|
@ -18,6 +18,22 @@ $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|||
$BaseDir = Split-Path -Parent $ScriptDir
|
||||
Set-Location $BaseDir
|
||||
|
||||
# Fail early if the active Python is not 3.12 or 3.13. uv pip installs into
|
||||
# whichever interpreter resolves here (the active venv, or PATH python), so a
|
||||
# mismatch surfaces as confusing wheel/build errors much later.
|
||||
$PythonBin = if ($env:PYTHON) { $env:PYTHON } else { 'python' }
|
||||
if (-not (Get-Command $PythonBin -ErrorAction SilentlyContinue)) {
|
||||
Write-Error "'$PythonBin' not found on PATH. Activate the project venv (or set `$env:PYTHON) and retry."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$PyMajMin = & $PythonBin -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")'
|
||||
if ($PyMajMin -ne '3.12' -and $PyMajMin -ne '3.13') {
|
||||
$PyPath = (Get-Command $PythonBin).Source
|
||||
Write-Error "Python 3.12 or 3.13 required, found $PyMajMin at $PyPath. Activate a venv built with python3.12 or python3.13 and retry."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Setting up pipecat as a git submodule..."
|
||||
|
||||
if (-not $Dev) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,26 @@ DOGRAH_DIR="$(dirname "$SCRIPT_DIR")"
|
|||
|
||||
cd "$DOGRAH_DIR"
|
||||
|
||||
# Fail early if the active Python is not 3.12 or 3.13. uv pip installs into
|
||||
# whichever interpreter resolves here (the active venv, or PATH python3), so a
|
||||
# mismatch surfaces as confusing wheel/build errors much later.
|
||||
PYTHON_BIN="${PYTHON:-python3}"
|
||||
if ! command -v "$PYTHON_BIN" >/dev/null 2>&1; then
|
||||
echo "Error: '$PYTHON_BIN' not found on PATH." >&2
|
||||
echo "Activate the project venv (or set PYTHON=/path/to/python) and retry." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PY_MAJ_MIN=$("$PYTHON_BIN" -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
|
||||
case "$PY_MAJ_MIN" in
|
||||
3.12|3.13) ;;
|
||||
*)
|
||||
echo "Error: Python 3.12 or 3.13 required, found $PY_MAJ_MIN at $(command -v "$PYTHON_BIN")." >&2
|
||||
echo "Activate a venv built with python3.12 or python3.13 and retry." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Setting up pipecat as a git submodule..."
|
||||
|
||||
if [ "$DEV_MODE" -eq 0 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue