mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-10 08:05:22 +02:00
fix: fix CD to rely on pipecat dev dependey
This commit is contained in:
parent
3565d65863
commit
c498a628ec
8 changed files with 149 additions and 86 deletions
26
.github/workflows/docs-openapi-drift.yml
vendored
26
.github/workflows/docs-openapi-drift.yml
vendored
|
|
@ -4,11 +4,11 @@ on:
|
|||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'api/**'
|
||||
- 'pipecat/**'
|
||||
- 'scripts/dump_docs_openapi.py'
|
||||
- 'docs/api-reference/openapi.json'
|
||||
- '.github/workflows/docs-openapi-drift.yml'
|
||||
- "api/**"
|
||||
- "pipecat/**"
|
||||
- "scripts/dump_docs_openapi.py"
|
||||
- "docs/api-reference/openapi.json"
|
||||
- ".github/workflows/docs-openapi-drift.yml"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
@ -27,16 +27,22 @@ jobs:
|
|||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
api/requirements.txt
|
||||
api/requirements.dev.txt
|
||||
pipecat/pyproject.toml
|
||||
|
||||
- name: Install api dependencies
|
||||
run: |
|
||||
pip install -r api/requirements.txt
|
||||
pip install './pipecat[cartesia,deepgram,openai,elevenlabs,groq,google,azure,sarvam,soundfile,silero,webrtc,speechmatics,openrouter,camb]'
|
||||
- name: Set up Node 22
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
cache-dependency-path: ui/package-lock.json
|
||||
|
||||
- name: Install api and pipecat dependencies
|
||||
run: ./scripts/setup_requirements.sh --dev
|
||||
|
||||
- name: Dump OpenAPI spec
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
mypy==1.15.0
|
||||
ruff==0.11.3
|
||||
pytest==8.3.5
|
||||
pytest-asyncio==0.26.0
|
||||
pre-commit==4.2.0
|
||||
watchfiles==1.1.0
|
||||
python-dotenv==1.2.1
|
||||
mypy==2.0.0
|
||||
watchfiles==1.1.1
|
||||
datamodel-code-generator==0.56.1
|
||||
twine==6.2.0
|
||||
build==1.2.2
|
||||
-e ./sdk/python
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import random
|
|||
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
||||
|
||||
import aiohttp
|
||||
from fastapi import HTTPException
|
||||
from fastapi import HTTPException, WebSocketDisconnect
|
||||
from loguru import logger
|
||||
|
||||
from api.enums import WorkflowRunMode
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ All commands below are shown for **macOS / Linux**. Expand the **Windows** tab f
|
|||
|
||||
### Steps
|
||||
1. Fork the Dograh repository by going to https://github.com/dograh-hq/dograh
|
||||
2. Clone the forked repository on your machine
|
||||
2. Clone the forked repository on your machine (use `--recurse-submodules` so the pipecat submodule is pulled in too)
|
||||
```
|
||||
git clone https://github.com/<GITHUB_HANDLE>/dograh
|
||||
git clone --recurse-submodules https://github.com/<GITHUB_HANDLE>/dograh
|
||||
cd dograh
|
||||
```
|
||||
3. Create a python virtual environment
|
||||
|
|
@ -34,19 +34,15 @@ python -m venv venv
|
|||
.\venv\Scripts\Activate.ps1
|
||||
```
|
||||
</CodeGroup>
|
||||
4. Install the requirements
|
||||
```
|
||||
pip install -r api/requirements.txt
|
||||
```
|
||||
5. Ensure you are on right version of Node.js using `node --version`
|
||||
4. Ensure you are on right version of Node.js using `node --version`
|
||||
```
|
||||
nvm use 24
|
||||
```
|
||||
6. Install UI dependencies
|
||||
5. Install UI dependencies
|
||||
```
|
||||
cd ui && npm install && cd ..
|
||||
```
|
||||
7. Start local docker services
|
||||
6. Start local docker services
|
||||
<Note>Please ensure you dont have any other instance of conflicting services running by checking `docker ps`</Note>
|
||||
```
|
||||
docker compose -f docker-compose-local.yaml up -d
|
||||
|
|
@ -59,7 +55,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
|
|||
6c7cb8afdf18 redis:7 "docker-entrypoint.s…" 18 seconds ago Up 18 seconds (healthy) 0.0.0.0:6379->6379/tcp, [::]:6379->6379/tcp dograh-redis-1
|
||||
a57e3e92b02c minio/minio "/usr/bin/docker-ent…" 18 seconds ago Up 18 seconds (healthy) 127.0.0.1:9000-9001->9000-9001/tcp dograh-minio-1
|
||||
```
|
||||
8. Setup environment variables
|
||||
7. Setup environment variables
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
cp api/.env.example api/.env && cp ui/.env.example ui/.env
|
||||
|
|
@ -69,16 +65,24 @@ Copy-Item api/.env.example api/.env
|
|||
Copy-Item ui/.env.example ui/.env
|
||||
```
|
||||
</CodeGroup>
|
||||
9. Setup pipecat git submodule
|
||||
8. Install Python requirements. The script initializes the pipecat submodule, installs `api/requirements.txt`, and installs pipecat with the required extras. Add the dev flag if you also want the pipecat dev dependency group (pytest, ruff, pre-commit, etc.).
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
bash scripts/setup_pipecat.sh
|
||||
# Default (runtime only)
|
||||
bash scripts/setup_requirements.sh
|
||||
|
||||
# Include pipecat dev dependencies
|
||||
bash scripts/setup_requirements.sh --dev
|
||||
```
|
||||
```powershell Windows
|
||||
.\scripts\setup_pipecat.ps1
|
||||
# Default (runtime only)
|
||||
.\scripts\setup_requirements.ps1
|
||||
|
||||
# Include pipecat dev dependencies
|
||||
.\scripts\setup_requirements.ps1 -Dev
|
||||
```
|
||||
</CodeGroup>
|
||||
10. Start backend services
|
||||
9. Start backend services
|
||||
<CodeGroup>
|
||||
```bash macOS/Linux
|
||||
bash scripts/start_services_dev.sh
|
||||
|
|
@ -105,11 +109,11 @@ tail -f logs/latest/*.log
|
|||
Get-Content logs/latest/*.log -Wait
|
||||
```
|
||||
</CodeGroup>
|
||||
11. Start the UI
|
||||
10. Start the UI
|
||||
```
|
||||
cd ui && npm run dev
|
||||
```
|
||||
12. You should be able to open the application on `localhost:3000` now
|
||||
11. You should be able to open the application on `localhost:3000` now
|
||||
|
||||
### Next Steps
|
||||
We ship with AGENTS.md and CLAUDE.md which will help the Coding Agents get started quickly with the codebase. This should help your favourite coding agents to be able to navigate the codebase quickly and you can make changes to it and suit your specification better.
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env pwsh
|
||||
# Setup script for using pipecat as a git submodule (Windows)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$BaseDir = Split-Path -Parent $ScriptDir
|
||||
Set-Location $BaseDir
|
||||
|
||||
Write-Host "Setting up pipecat as a git submodule..."
|
||||
|
||||
# Initialize and update submodules
|
||||
Write-Host "Initializing git submodules..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Install dograh API requirements first so pipecat's extras win on any
|
||||
# shared transitive dependencies (matches api/Dockerfile and CI workflow).
|
||||
Write-Host "Installing dograh API requirements..."
|
||||
pip install -r api/requirements.txt
|
||||
|
||||
# Install pipecat in editable mode with all extras
|
||||
Write-Host "Installing pipecat dependencies..."
|
||||
pip install -e './pipecat[cartesia,deepgram,openai,elevenlabs,groq,google,azure,sarvam,soundfile,silero,webrtc,speechmatics,openrouter,camb]'
|
||||
|
||||
Write-Host "Setup complete! Pipecat is now available as a git submodule."
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Setup script for using pipecat as a git submodule
|
||||
|
||||
# Get the project root directory (parent of scripts)
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DOGRAH_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
cd "$DOGRAH_DIR"
|
||||
|
||||
echo "Setting up pipecat as a git submodule..."
|
||||
|
||||
# Initialize and update submodules
|
||||
echo "Initializing git submodules..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
# Install dograh API requirements first so pipecat's extras win on any
|
||||
# shared transitive dependencies (matches api/Dockerfile and CI workflow).
|
||||
echo "Installing dograh API requirements..."
|
||||
pip install -r api/requirements.txt
|
||||
|
||||
# Install pipecat in editable mode with all extras
|
||||
echo "Installing pipecat dependencies..."
|
||||
pip install -e ./pipecat[cartesia,deepgram,openai,elevenlabs,groq,google,azure,sarvam,soundfile,silero,webrtc,speechmatics,openrouter,camb]
|
||||
|
||||
echo "Setup complete! Pipecat is now available as a git submodule."
|
||||
48
scripts/setup_requirements.ps1
Normal file
48
scripts/setup_requirements.ps1
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env pwsh
|
||||
# Setup script for using pipecat as a git submodule (Windows).
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/setup_requirements.ps1 # default: install runtime deps
|
||||
# ./scripts/setup_requirements.ps1 -Dev # also install pipecat dev deps;
|
||||
# # skips git submodule update (CI
|
||||
# # already checks out submodules).
|
||||
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[switch]$Dev
|
||||
)
|
||||
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$BaseDir = Split-Path -Parent $ScriptDir
|
||||
Set-Location $BaseDir
|
||||
|
||||
Write-Host "Setting up pipecat as a git submodule..."
|
||||
|
||||
if (-not $Dev) {
|
||||
Write-Host "Initializing git submodules..."
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
|
||||
# Install dograh API requirements first so pipecat's extras win on any
|
||||
# shared transitive dependencies (matches api/Dockerfile and CI workflow).
|
||||
Write-Host "Installing dograh API requirements..."
|
||||
pip install -r api/requirements.txt
|
||||
|
||||
if ($Dev) {
|
||||
Write-Host "Installing dograh API dev requirements..."
|
||||
pip install -r api/requirements.dev.txt
|
||||
}
|
||||
|
||||
# Install pipecat in editable mode with all extras
|
||||
Write-Host "Installing pipecat dependencies..."
|
||||
pip install -e './pipecat[cartesia,deepgram,openai,elevenlabs,groq,google,azure,sarvam,soundfile,silero,webrtc,speechmatics,openrouter,camb]'
|
||||
|
||||
if ($Dev) {
|
||||
Write-Host "Installing pipecat dev dependencies..."
|
||||
pip install --upgrade pip
|
||||
pip install --group pipecat/pyproject.toml:dev
|
||||
}
|
||||
|
||||
Write-Host "Setup complete! Pipecat is now available as a git submodule."
|
||||
62
scripts/setup_requirements.sh
Executable file
62
scripts/setup_requirements.sh
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Setup script for using pipecat as a git submodule.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/setup_requirements.sh # default: install runtime deps
|
||||
# ./scripts/setup_requirements.sh --dev # also install pipecat dev deps;
|
||||
# # skips git submodule update (CI
|
||||
# # already checks out submodules).
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DEV_MODE=0
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--dev)
|
||||
DEV_MODE=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $1" >&2
|
||||
echo "Usage: $0 [--dev]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Get the project root directory (parent of scripts)
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DOGRAH_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
cd "$DOGRAH_DIR"
|
||||
|
||||
echo "Setting up pipecat as a git submodule..."
|
||||
|
||||
if [ "$DEV_MODE" -eq 0 ]; then
|
||||
echo "Initializing git submodules..."
|
||||
git submodule update --init --recursive
|
||||
fi
|
||||
|
||||
# Install dograh API requirements first so pipecat's extras win on any
|
||||
# shared transitive dependencies (matches api/Dockerfile and CI workflow).
|
||||
echo "Installing dograh API requirements..."
|
||||
pip install -r api/requirements.txt
|
||||
|
||||
if [ "$DEV_MODE" -eq 1 ]; then
|
||||
echo "Installing dograh API dev requirements..."
|
||||
pip install -r api/requirements.dev.txt
|
||||
fi
|
||||
|
||||
# Install pipecat in editable mode with all extras
|
||||
echo "Installing pipecat dependencies..."
|
||||
pip install -e ./pipecat[cartesia,deepgram,openai,elevenlabs,groq,google,azure,sarvam,soundfile,silero,webrtc,speechmatics,openrouter,camb]
|
||||
|
||||
if [ "$DEV_MODE" -eq 1 ]; then
|
||||
echo "Installing pipecat dev dependencies..."
|
||||
pip install --upgrade pip
|
||||
pip install --group pipecat/pyproject.toml:dev
|
||||
fi
|
||||
|
||||
echo "Setup complete! Pipecat is now available as a git submodule."
|
||||
Loading…
Add table
Add a link
Reference in a new issue