diff --git a/Dockerfile b/Dockerfile index d39388c..cd01b7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # copy only the requirements file to leverage container image build cache -COPY ./requirements.txt /app/UltraSinger/requirements.txt +COPY ./requirements.txt /app/UltraSinger/requirements-linux.txt WORKDIR /app/UltraSinger # no need to run as root @@ -20,7 +20,7 @@ RUN python3 -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" # install dependencies -RUN pip install --no-cache-dir -r requirements.txt \ +RUN pip install --no-cache-dir -r requirements-linux.txt \ && pip install --no-cache-dir torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu121 \ && pip install --no-cache-dir tensorflow[and-cuda]==2.16.1 diff --git a/install/CPU/linux_cpu.sh b/install/CPU/linux_cpu.sh index 93a5713..20f1572 100644 --- a/install/CPU/linux_cpu.sh +++ b/install/CPU/linux_cpu.sh @@ -3,5 +3,5 @@ cd .. cd .. python3.10 -m venv .venv source .venv/bin/activate -pip install -r requirements.txt +pip install -r requirements-linux.txt pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 diff --git a/install/CPU/windows_cpu.bat b/install/CPU/windows_cpu.bat index 83001a1..839845e 100644 --- a/install/CPU/windows_cpu.bat +++ b/install/CPU/windows_cpu.bat @@ -4,6 +4,6 @@ cd .. cd .. py -3.10 -m venv .venv SET VenvPythonPath=%CD%\.venv\Scripts\python.exe -call %VenvPythonPath% -m pip install -r requirements.txt +call %VenvPythonPath% -m pip install -r requirements-windows.txt call %VenvPythonPath% -m pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 endlocal \ No newline at end of file diff --git a/install/CUDA/linux_cuda_gpu.sh b/install/CUDA/linux_cuda_gpu.sh index ce460ca..ced7a2b 100644 --- a/install/CUDA/linux_cuda_gpu.sh +++ b/install/CUDA/linux_cuda_gpu.sh @@ -3,5 +3,5 @@ cd .. cd .. python3.10 -m venv .venv source .venv/bin/activate -pip install -r requirements.txt +pip install -r requirements-linux.txt pip install torch==2.3.1+cu118 torchvision==0.18.1+cu118 torchaudio==2.3.1+cu118 --index-url https://download.pytorch.org/whl/cu118 diff --git a/install/CUDA/windows_cuda_gpu.bat b/install/CUDA/windows_cuda_gpu.bat index 3dd069d..7120095 100644 --- a/install/CUDA/windows_cuda_gpu.bat +++ b/install/CUDA/windows_cuda_gpu.bat @@ -4,6 +4,6 @@ cd .. cd .. py -3.10 -m venv .venv SET VenvPythonPath=%CD%\.venv\Scripts\python.exe -call %VenvPythonPath% -m pip install -r requirements.txt +call %VenvPythonPath% -m pip install -r requirements-windows.txt call %VenvPythonPath% -m pip install torch==2.3.1+cu118 torchvision==0.18.1+cu118 torchaudio==2.3.1+cu118 --index-url https://download.pytorch.org/whl/cu118 endlocal \ No newline at end of file diff --git a/requirements-linux.txt b/requirements-linux.txt new file mode 100644 index 0000000..6ef5072 --- /dev/null +++ b/requirements-linux.txt @@ -0,0 +1,648 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile --output-file=requirements-linux.txt +# +absl-py==2.3.0 + # via + # keras + # tensorboard + # tensorflow +aiohappyeyeballs==2.6.1 + # via aiohttp +aiohttp==3.12.9 + # via fsspec +aiosignal==1.3.2 + # via aiohttp +alembic==1.16.1 + # via optuna +antlr4-python3-runtime==4.9.3 + # via omegaconf +appdirs==1.4.4 + # via pyhyphen +asteroid-filterbanks==0.4.0 + # via pyannote-audio +astroid==3.3.10 + # via pylint +astunparse==1.6.3 + # via tensorflow +async-timeout==5.0.1 + # via aiohttp +attrs==25.3.0 + # via aiohttp +audioread==3.0.1 + # via librosa +av==14.4.0 + # via faster-whisper +black==25.1.0 + # via -r requirements.in +certifi==2025.4.26 + # via requests +cffi==1.17.1 + # via soundfile +chardet==5.2.0 + # via music21 +charset-normalizer==3.4.2 + # via requests +click==8.2.1 + # via + # black + # nltk + # typer +cloudpickle==3.1.1 + # via submitit +colorama==0.4.6 + # via + # click + # colorlog + # pylint + # pytest + # tqdm +coloredlogs==15.0.1 + # via onnxruntime +colorlog==6.9.0 + # via optuna +contourpy==1.3.2 + # via matplotlib +crepe==0.0.16 + # via -r requirements.in +ctranslate2==4.4.0 + # via + # faster-whisper + # whisperx +cycler==0.12.1 + # via matplotlib +dataclasses==0.6 + # via -r requirements.in +dataclasses-json==0.6.7 + # via -r requirements.in +decorator==5.2.1 + # via librosa +demucs==4.0.1 + # via -r requirements.in +dill==0.4.0 + # via pylint +docopt==0.6.2 + # via + # num2words + # pyannote-metrics + # pyannote-pipeline +dora-search==0.1.12 + # via demucs +einops==0.8.1 + # via + # demucs + # pyannote-audio +exceptiongroup==1.3.0 + # via pytest +faster-whisper==1.1.0 + # via whisperx +ffmpeg-python==0.2.0 + # via -r requirements.in +filelock==3.18.0 + # via + # huggingface-hub + # pyannote-pipeline + # torch + # transformers +flatbuffers==25.2.10 + # via + # onnxruntime + # tensorflow +fonttools==4.58.1 + # via matplotlib +frozenlist==1.6.2 + # via + # aiohttp + # aiosignal +fsspec[http]==2025.5.1 + # via + # huggingface-hub + # lightning + # pytorch-lightning + # torch +future==1.0.0 + # via ffmpeg-python +gast==0.6.0 + # via tensorflow +google-pasta==0.2.0 + # via tensorflow +greenlet==3.2.3 + # via sqlalchemy +grpcio==1.72.1 + # via + # tensorboard + # tensorflow +h5py==3.13.0 + # via + # crepe + # keras + # tensorflow +hmmlearn==0.3.3 + # via crepe +huggingface-hub==0.32.4 + # via + # faster-whisper + # pyannote-audio + # speechbrain + # tokenizers + # transformers +humanfriendly==10.0 + # via coloredlogs +hyperpyyaml==1.2.2 + # via speechbrain +idna==3.10 + # via + # requests + # yarl +imageio==2.37.0 + # via crepe +iniconfig==2.1.0 + # via pytest +inputimeout==1.0.4 + # via -r requirements.in +isort==6.0.1 + # via + # -r requirements.in + # pylint +jinja2==3.1.6 + # via torch +joblib==1.5.1 + # via + # librosa + # music21 + # nltk + # scikit-learn + # speechbrain +jsonpickle==4.1.1 + # via music21 +julius==0.2.7 + # via + # demucs + # torch-audiomentations +keras==3.10.0 + # via tensorflow +kiwisolver==1.4.8 + # via matplotlib +lameenc==1.8.1 + # via demucs +langcodes==3.5.0 + # via -r requirements.in +language-data==1.3.0 + # via langcodes +levenshtein==0.27.1 + # via python-levenshtein +libclang==18.1.1 + # via tensorflow +librosa==0.9.2 + # via -r requirements.in +lightning==2.5.1.post0 + # via pyannote-audio +lightning-utilities==0.14.3 + # via + # lightning + # pytorch-lightning + # torchmetrics +llvmlite==0.44.0 + # via numba +mako==1.3.10 + # via alembic +marisa-trie==1.2.1 + # via language-data +markdown==3.8 + # via tensorboard +markdown-it-py==3.0.0 + # via rich +markupsafe==3.0.2 + # via + # jinja2 + # mako + # werkzeug +marshmallow==3.26.1 + # via dataclasses-json +matplotlib==3.10.3 + # via + # -r requirements.in + # crepe + # music21 + # pyannote-metrics +mccabe==0.7.0 + # via pylint +mdurl==0.1.2 + # via markdown-it-py +mido==1.3.3 + # via pretty-midi +ml-dtypes==0.5.1 + # via + # keras + # tensorflow +more-itertools==10.7.0 + # via music21 +mpmath==1.3.0 + # via sympy +multidict==6.4.4 + # via + # aiohttp + # yarl +music21==9.7.0 + # via -r requirements.in +musicbrainzngs==0.7.1 + # via -r requirements.in +mypy-extensions==1.1.0 + # via + # black + # typing-inspect +namex==0.1.0 + # via keras +networkx==3.4.2 + # via torch +nltk==3.9.1 + # via whisperx +num2words==0.5.14 + # via -r requirements.in +numba==0.61.2 + # via + # librosa + # resampy +numpy==1.26.4 + # via + # -r requirements.in + # asteroid-filterbanks + # contourpy + # crepe + # ctranslate2 + # h5py + # hmmlearn + # imageio + # keras + # librosa + # matplotlib + # ml-dtypes + # music21 + # numba + # onnxruntime + # openunmix + # optuna + # pandas + # pretty-midi + # pyannote-core + # pyannote-metrics + # pytorch-metric-learning + # resampy + # scikit-learn + # scipy + # soundfile + # speechbrain + # tensorboard + # tensorboardx + # tensorflow + # torchmetrics + # transformers +omegaconf==2.3.0 + # via + # dora-search + # pyannote-audio +onnxruntime==1.22.0 + # via faster-whisper +openunmix==1.3.0 + # via demucs +opt-einsum==3.4.0 + # via tensorflow +optree==0.16.0 + # via keras +optuna==4.3.0 + # via pyannote-pipeline +packaging==24.2 + # via + # -r requirements.in + # black + # huggingface-hub + # keras + # librosa + # lightning + # lightning-utilities + # marshmallow + # matplotlib + # mido + # onnxruntime + # optuna + # pooch + # pytest + # pytorch-lightning + # speechbrain + # tensorboard + # tensorboardx + # tensorflow + # torch-pitch-shift + # torchmetrics + # transformers +pandas==2.3.0 + # via + # pyannote-database + # pyannote-metrics + # whisperx +pathspec==0.12.1 + # via black +pillow==11.2.1 + # via + # imageio + # matplotlib +platformdirs==4.3.8 + # via + # black + # pooch + # pylint +pluggy==1.6.0 + # via pytest +pooch==1.8.2 + # via librosa +pretty-midi==0.2.10 + # via -r requirements.in +primepy==1.3 + # via torch-pitch-shift +propcache==0.3.1 + # via + # aiohttp + # yarl +protobuf==5.29.5 + # via + # onnxruntime + # tensorboard + # tensorboardx + # tensorflow +pyannote-audio==3.3.2 + # via whisperx +pyannote-core==5.0.0 + # via + # pyannote-audio + # pyannote-database + # pyannote-metrics + # pyannote-pipeline +pyannote-database==5.1.3 + # via + # pyannote-audio + # pyannote-metrics + # pyannote-pipeline +pyannote-metrics==3.2.1 + # via pyannote-audio +pyannote-pipeline==3.0.1 + # via pyannote-audio +pycparser==2.22 + # via cffi +pydub==0.25.1 + # via -r requirements.in +pygments==2.19.1 + # via + # pytest + # rich +pyhyphen==4.0.4 + # via -r requirements.in +pylint==3.3.7 + # via -r requirements.in +pyparsing==3.2.3 + # via matplotlib +pyreadline3==3.5.4 + # via humanfriendly +pytest==8.4.0 + # via -r requirements.in +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +python-levenshtein==0.27.1 + # via -r requirements.in +pytorch-lightning==2.5.1.post0 + # via lightning +pytorch-metric-learning==2.8.1 + # via pyannote-audio +pytz==2025.2 + # via pandas +pyyaml==6.0.2 + # via + # ctranslate2 + # demucs + # huggingface-hub + # hyperpyyaml + # lightning + # omegaconf + # optuna + # pyannote-database + # pyannote-pipeline + # pytorch-lightning + # transformers +rapidfuzz==3.13.0 + # via levenshtein +regex==2024.11.6 + # via + # nltk + # transformers +requests==2.32.3 + # via + # huggingface-hub + # music21 + # pooch + # pyhyphen + # tensorflow + # transformers +resampy==0.4.3 + # via + # crepe + # librosa +retrying==1.3.4 + # via dora-search +rich==14.0.0 + # via + # keras + # pyannote-audio + # typer +ruamel-yaml==0.18.12 + # via hyperpyyaml +ruamel-yaml-clib==0.2.12 + # via ruamel-yaml +safetensors==0.5.3 + # via transformers +scikit-learn==1.6.1 + # via + # crepe + # hmmlearn + # librosa + # pyannote-metrics + # pyannote-pipeline + # pytorch-metric-learning +scipy==1.15.3 + # via + # -r requirements.in + # crepe + # hmmlearn + # librosa + # pyannote-core + # pyannote-metrics + # scikit-learn + # speechbrain +semver==3.0.4 + # via pyannote-audio +sentencepiece==0.2.0 + # via speechbrain +shellingham==1.5.4 + # via typer +six==1.17.0 + # via + # astunparse + # google-pasta + # pretty-midi + # python-dateutil + # retrying + # tensorboard + # tensorflow +sortedcontainers==2.4.0 + # via pyannote-core +soundfile==0.13.1 + # via + # librosa + # pyannote-audio +speechbrain==1.0.3 + # via pyannote-audio +sqlalchemy==2.0.41 + # via + # alembic + # optuna +submitit==1.5.3 + # via dora-search +sympy==1.14.0 + # via + # onnxruntime + # pyannote-metrics + # torch +tabulate==0.9.0 + # via pyannote-metrics +tensorboard==2.19.0 + # via tensorflow +tensorboard-data-server==0.7.2 + # via tensorboard +tensorboardx==2.6.2.2 + # via pyannote-audio +tensorflow==2.19.0 + # via -r requirements.in +tensorflow-io-gcs-filesystem==0.31.0 + # via tensorflow +termcolor==3.1.0 + # via tensorflow +threadpoolctl==3.6.0 + # via scikit-learn +tokenizers==0.21.1 + # via + # faster-whisper + # transformers +tomli==2.2.1 + # via + # alembic + # black + # pylint + # pytest +tomlkit==0.13.3 + # via pylint +torch==2.7.1 + # via + # asteroid-filterbanks + # demucs + # dora-search + # julius + # lightning + # openunmix + # pyannote-audio + # pytorch-lightning + # pytorch-metric-learning + # speechbrain + # torch-audiomentations + # torch-pitch-shift + # torchaudio + # torchmetrics + # whisperx +torch-audiomentations==0.12.0 + # via pyannote-audio +torch-pitch-shift==1.2.5 + # via torch-audiomentations +torchaudio==2.7.1 + # via + # demucs + # openunmix + # pyannote-audio + # speechbrain + # torch-audiomentations + # torch-pitch-shift + # whisperx +torchmetrics==1.7.2 + # via + # lightning + # pyannote-audio + # pytorch-lightning +tqdm==4.67.1 + # via + # -r requirements.in + # demucs + # faster-whisper + # huggingface-hub + # lightning + # nltk + # openunmix + # optuna + # pyannote-pipeline + # pytorch-lightning + # pytorch-metric-learning + # speechbrain + # transformers +transformers==4.52.4 + # via whisperx +treetable==0.2.5 + # via dora-search +typer==0.16.0 + # via pyannote-database +typing-extensions==4.14.0 + # via + # alembic + # asteroid-filterbanks + # astroid + # black + # exceptiongroup + # huggingface-hub + # lightning + # lightning-utilities + # multidict + # optree + # pyannote-core + # pytorch-lightning + # rich + # sqlalchemy + # submitit + # tensorflow + # torch + # typer + # typing-inspect +typing-inspect==0.9.0 + # via dataclasses-json +tzdata==2025.2 + # via pandas +unidecode==1.4.0 + # via -r requirements.in +urllib3==2.4.0 + # via requests +webcolors==24.11.1 + # via music21 +werkzeug==3.1.3 + # via tensorboard +wheel==0.45.1 + # via + # astunparse + # pyhyphen +whisperx==3.3.1 + # via -r requirements.in +wrapt==1.17.2 + # via tensorflow +yarl==1.20.0 + # via aiohttp +yt-dlp==2025.5.22 + # via -r requirements.in + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements.txt b/requirements-windows.txt similarity index 100% rename from requirements.txt rename to requirements-windows.txt diff --git a/requirements.in b/requirements.in index f0574fd..121c173 100644 --- a/requirements.in +++ b/requirements.in @@ -1,10 +1,23 @@ # requirements.in +# HOW TO USE: +# Change the tensorflow version for each OS +# pip-compile -o requirements-linux.txt +# pip-compile -o requirements-windows.txt +# Update Package +# pip-compile -P yt_dlp +# Update all packages +# pip-compile -U + # Pitching crepe # machine learning platform (used for crepe) # This is only compatible with Python 3.10 and older -tensorflow==2.10 +# 2.10 is only needed for windows GPU support +# WINDOWS +#tensorflow==2.10 +# LINUX +tensorflow # Audio to wavefile (used for crepe) scipy