# A SECOND venv inside the audio image, for audiocraft alone.
#
# audiocraft pins torch==2.1.0, torchvision==0.16.0 and torchtext==0.16.0. Two
# separate problems with that:
#
#  1. torch 2.1.0 has no build for Python 3.12 at all — support starts at 2.2 —
#     so the pin is unsatisfiable in this image whatever else we do.
#  2. Even if it existed, installing it into the server's venv would downgrade
#     torch five majors and leave the pod with no working GPU torch, because
#     2.1.0 has no build for this image's CUDA either.
#
# So: its own venv, on the oldest torch this Python can run, with audiocraft
# installed --no-deps (see the .nodeps file beside this one) and the deps it
# actually uses listed here. --no-deps is reckless in a shared venv and routine
# in an isolated one — nothing here can reach the server's stack.
--extra-index-url https://download.pytorch.org/whl/cu121
# torch 2.5.1, not the 2.1.0 audiocraft asks for and not the 2.2.2 tried before.
# The binding constraint is xformers, which audiocraft imports at module load:
# its cp312 wheels start at 0.0.27, and every version below that can only build
# from source — which needs torch installed already and fails in a fresh venv
# with "No module named 'torch'". xformers 0.0.28.post3 requires torch==2.5.1
# exactly, so the pair is chosen by what actually has wheels for this Python,
# not by what the libraries would prefer.
torch==2.5.1
torchaudio==2.5.1
torchvision==0.20.1

# audiocraft's real runtime dependencies. Its dev-only ones (pytest, flake8,
# mypy, coverage, pdoc3) and gradio are deliberately absent: a pod serves an
# API, it does not run the library's test suite or its demo UI. torchtext is
# absent too — it is abandoned, unbuildable here, and unused at inference.
#
# xformers IS needed: audiocraft imports it at module load, so leaving it out
# turned the build's import check into a ModuleNotFoundError — which is exactly
# what that check is for. Pinned to the version whose wheel matches the torch
# above; see the note there for why that torch and not audiocraft's.
xformers==0.0.28.post3
av>=11.0.0
einops
flashy>=0.0.1
hydra-core>=1.1
hydra_colorlog
julius
num2words
sentencepiece
spacy>=3.6.1
huggingface_hub
tqdm
librosa
torchmetrics
encodec
protobuf
numpy<2
