Commit 4a81091f authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Make CI tests light: defer torch/demucs to a prod-only requirements file

CI's test job was installing torch + demucs (a neural net stem-separation
model) on every single push even though nothing in the test suite calls the
real separator - test_remix.py mocks render_remix_sync entirely, and
remix_engine.py's own detect_key/sidechain/style-preset tests only need
librosa/scipy/numpy/pedalboard, not torch. That's most of what was making
the pipeline slow (torch alone is a large download+install, on top of the
memory pressure that caused the earlier 5min stall).

- src/services/remix_engine.py: `import torch` and the mkldnn tweak move
  from module level into _get_separator(), alongside the already-lazy demucs
  import. The module (and everything depending on it, like the /remix
  router) now imports cleanly with neither installed.
- requirements.txt: demucs removed. numpy/scipy/librosa/soundfile/pedalboard
  stay - real libraries, but not the heavy part, and needed for the audio-
  math tests that do run in CI.
- requirements-remix.txt (new): just demucs, install torch CPU-only before
  it. Only installed by deploy.sh (prod), never in CI.
- .gitlab-ci.yml test job: drops the torch install step entirely.

Verified locally: uninstalled torch+demucs from the dev venv, app still
imports and all 104 tests still pass in ~3s.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent 4a6db62c
Pipeline #1013 canceled with stage
in 17 minutes and 27 seconds