• Aryan Noshirvnai's avatar
    Make CI tests light: defer torch/demucs to a prod-only requirements file · 4a81091f
    Aryan Noshirvnai authored
    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
    4a81091f
Name
Last commit
Last update
alembic Loading commit data...
deploy Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.env.example Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
alembic.ini Loading commit data...
docker-compose.yml Loading commit data...
requirements-remix.txt Loading commit data...
requirements.txt Loading commit data...
setup.sh Loading commit data...