Spaces:
Paused
Paused
File size: 2,191 Bytes
ec17af3 | 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | # Local Machine Workflow
This is the recommended path for developing Speech-Machine on one machine with Docker Desktop.
## Prerequisites
- Docker Desktop running
- Node 20+ for local web checks
- Python environment at `~/venvs/mlx` for local API checks
Install dependencies:
```bash
cd /Users/susant-achary/dev_work/git_codes/c_base/Speech-Machine
make install
```
## Start The Stack
```bash
make local-up
```
This starts:
- Web: http://localhost:3000
- API: http://localhost:8000
- API docs: http://localhost:8000/docs
- Postgres: localhost:5432
- Redis: localhost:6379
On first launch, create the local admin account in the setup screen or run:
```bash
curl -X POST http://localhost:8000/setup \
-H "Content-Type: application/json" \
-d '{"email":"admin@example.com","password":"change-me-strong"}'
```
## Smoke Check
After the stack is running:
```bash
make local-smoke
```
## Local AI Coaching
The local feature build defaults to Ollama for AI coaching.
Start Ollama on the host machine:
```bash
ollama pull llama3.2:3b
ollama serve
```
The Docker stack reaches Ollama through:
```bash
OLLAMA_BASE_URL=http://host.docker.internal:11434
```
After a session transcription completes, the worker computes analytics and queues coaching feedback. If Ollama is not running, transcription still completes and the session coaching panel shows a retryable failure.
Override the setup/login account if needed:
```bash
make local-smoke ADMIN_EMAIL=you@example.com ADMIN_PASSWORD='your-local-password'
```
## Common Commands
```bash
make local-build
make local-up
make logs
make down
make reset-local
```
`make reset-local` deletes local Docker volumes, including the database, Redis data, uploaded files, and downloaded models.
## Verification
```bash
make check
```
This runs the local web tests, shared TypeScript check, web lint/typecheck, API tests, API Ruff, API mypy, and Docker Compose config validation.
## Local Defaults
- `LOCAL_ONLY_MODE=true`
- `STORAGE_BACKEND=local`
- `WHISPER_MODEL=small`
- `WHISPER_DEVICE=cpu`
- `CORS_ORIGINS=http://localhost:3000`
The old fixed `admin/admin` login is not used. First-run setup creates the local admin account.
|