uv run spawns uvicorn, which uses multiprocessing.spawn for hot reload. The spawned subprocess starts a fresh Python interpreter that bypasses uv's venv activation — so it never sees the venv's packages. Fix: use a standalone python:3.12-slim dev stage with pip install -e . directly into the system Python. No venv means the spawn subprocess uses the same interpreter with the same packages. The editable install creates a .pth file pointing to /app/src, so the mounted host source is live. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
917 B
917 B