|
| 1 | +# Dreamverse Development |
| 2 | + |
| 3 | +Dreamverse lives under `apps/dreamverse/` as a product app inside the |
| 4 | +FastVideo monorepo. Backend code uses the local FastVideo workspace package; |
| 5 | +frontend tooling remains standalone under `apps/dreamverse/web/`. |
| 6 | + |
| 7 | +## Backend tests |
| 8 | + |
| 9 | +Run CPU-safe backend tests from the FastVideo repository root: |
| 10 | + |
| 11 | +```bash |
| 12 | +uv run --locked --package dreamverse --extra test pytest apps/dreamverse/server/tests/ -m 'not gpu' -q |
| 13 | +``` |
| 14 | + |
| 15 | +## Backend launch |
| 16 | + |
| 17 | +Launch the migrated backend through the installed console commands: |
| 18 | + |
| 19 | +```bash |
| 20 | +dreamverse-server --port 8009 |
| 21 | +dreamverse-mock-server --port 8009 |
| 22 | +``` |
| 23 | + |
| 24 | +If `dreamverse-server` is missing, install FastVideo with the `dreamverse` |
| 25 | +extra from the checkout: |
| 26 | + |
| 27 | +```bash |
| 28 | +uv pip install -e ".[dreamverse]" |
| 29 | +``` |
| 30 | + |
| 31 | +## Frontend build and tests |
| 32 | + |
| 33 | +Run frontend commands from the standalone web app: |
| 34 | + |
| 35 | +```bash |
| 36 | +cd apps/dreamverse/web |
| 37 | +pnpm install --frozen-lockfile |
| 38 | +pnpm run build |
| 39 | +pnpm run test |
| 40 | +``` |
| 41 | + |
| 42 | +Playwright is intentionally run against a live backend as part of the GPU4 |
| 43 | +manual verification flow, not in the Phase 3 migration gate. |
| 44 | + |
| 45 | +## Local GPU4 verification hook |
| 46 | + |
| 47 | +Use physical GPU 4 for migration smoke tests. `CUDA_VISIBLE_DEVICES=4` makes |
| 48 | +that GPU appear as logical GPU 0 inside the process, preserving the previous |
| 49 | +Dreamverse deployment behavior. |
| 50 | + |
| 51 | +```bash |
| 52 | +CUDA_VISIBLE_DEVICES=4 dreamverse-server --host 0.0.0.0 --port 8009 |
| 53 | +``` |
| 54 | + |
| 55 | +In another shell, verify the service: |
| 56 | + |
| 57 | +```bash |
| 58 | +curl -s http://localhost:8009/healthz |
| 59 | +``` |
| 60 | + |
| 61 | +Phase 4 adds the public `/healthz`, `/readyz`, `/status`, |
| 62 | +`/prompt-system-config`, and `/curated-presets` route coverage needed for the |
| 63 | +full Playwright suite. |
| 64 | + |
| 65 | +## Phase 0 production-equivalent prerequisites |
| 66 | + |
| 67 | +For the production-equivalent NVFP4 path, install these dependencies |
| 68 | +in the FastVideo `.venv` before GPU smoke tests: |
| 69 | + |
| 70 | +```bash |
| 71 | +uv pip install --python .venv/bin/python \ |
| 72 | + flashinfer-python flash-attn cerebras-cloud-sdk openai \ |
| 73 | + --no-build-isolation |
| 74 | +``` |
| 75 | + |
| 76 | +| Package | Why | |
| 77 | +|---|---| |
| 78 | +| `flashinfer-python` | Required for NVFP4 quantization. Without it, model load fails with `ImportError: NVFP4 quantization requires flashinfer`. | |
| 79 | +| `flash-attn` | Optional but recommended; without it attention falls back to Torch SDPA (functional but slower). | |
| 80 | +| `cerebras-cloud-sdk` | Required by the migrated prompt enhancer for the default `cerebras` provider. | |
| 81 | +| `openai` | Required by the prompt enhancer's OpenAI-compatible providers + downstream rewrites. | |
| 82 | + |
| 83 | +### B200 / sm_100a + gcc-15 conda toolchain (flashinfer JIT workaround) |
| 84 | + |
| 85 | +On hosts where the conda toolchain ships gcc-15 (which nvcc rejects with |
| 86 | +`#error -- unsupported GNU version! gcc versions later than 14 are not |
| 87 | +supported!`), set these env vars before launching anything that triggers |
| 88 | +flashinfer's JIT kernel build: |
| 89 | + |
| 90 | +```bash |
| 91 | +export CC=/usr/bin/gcc-13 |
| 92 | +export CXX=/usr/bin/g++-13 |
| 93 | +export CUDAHOSTCXX=/usr/bin/g++-13 |
| 94 | +export NVCC_PREPEND_FLAGS="-ccbin /usr/bin/gcc-13 -allow-unsupported-compiler" |
| 95 | +``` |
| 96 | + |
| 97 | +`dreamverse-server` does NOT set these — they need to come from the launching |
| 98 | +shell. The `dreamverse-deploy` skill |
| 99 | +([`.agents/skills/dreamverse-deploy/`](../../.agents/skills/dreamverse-deploy/SKILL.md)) |
| 100 | +sets them for you and is the recommended local-deploy path. |
0 commit comments