diff --git a/Contributing.md b/Contributing.md index 0ea056e1..25002412 100644 --- a/Contributing.md +++ b/Contributing.md @@ -27,7 +27,7 @@ See [Pull Request Recommendations](#pull-request-recommendations) for hints on m Run these commands in each of your sandboxes to enable our pre-commit hooks and gitlint: ```sh -pip install -r requirements.dev.txt +pip install -e '.[dev]' pre-commit install gitlint install-hook git submodule foreach 'pre-commit install' @@ -61,11 +61,11 @@ All the pre-commit hooks are executed using a tool called [pre-commit](https://pre-commit.com/). Once you enable pre-commit, it will run all the hooks each time you try to commit anything in this repo. -We've listed all the developper dependencies for the project in -[requirements.dev.txt](requirements.dev.txt) to make them easy to install: +The developer dependencies are listed in the dev extra in [pyproject.toml](pyproject.toml) +to make them easy to install: ```sh -pip install -r requirements.dev.txt +pip install -e '.[dev]' pre-commit install ``` @@ -132,12 +132,12 @@ commit-msg hook in Git. Run this command in your sandbox to install and enable the commit-msg hook: ```sh -pip install -r requirements/requirements.dev.txt +pip install -e '.[dev]' gitlint install-hook ``` -- Now, next time you make a change and commit it, your commit log will be checked: - - `git commit -m'non-compliant commit log text'` outputs an error +- Now, your commit log will be checked: + - `git commit -m'non-compliant commit message'` outputs an error - `git commit -m'fix(g2p): fixing a bug in g2p integration'` works ### Initializing submodules too diff --git a/docs/install.md b/docs/install.md index 3df29cd1..8fcf9eca 100644 --- a/docs/install.md +++ b/docs/install.md @@ -89,7 +89,7 @@ we maintain a script to automate the process and keep it reliable. conda create --name EveryVoice python=3.12 ffmpeg conda activate EveryVoice conda install sox -c conda-forge - CUDA_TAG=cu121 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html + CUDA_TAG=cu126 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html pip install -e '.[dev]' ``` @@ -99,8 +99,7 @@ we maintain a script to automate the process and keep it reliable. ``` uv venv -p 3.12 .venv source .venv/bin/activate - uv pip install torch==2.3.1+cu121 torchaudio==2.3.1+cu121 --find-links https://download.pytorch.org/whl/torch_stable.html - uv pip install -e '.[dev]' + uv pip install -e '.[dev]' --torch-backend=cu126 ``` ### Option 2-b — Manual installation — Detailed @@ -133,24 +132,25 @@ Create a new virtual environment and activate it: Install our pytorch requirements from `requirements.torch.txt`: ```sh - CUDA_TAG=cu121 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html + CUDA_TAG=cu126 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html ``` === "Using uv" - Install our pytorch requirements specified in `requirements.torch.txt`, but manually. - (Unfortunately, `uv` does not support the environment variable we use with pip and conda.) + Since version 0.6.9, `uv` has a `--torch-backend` option for automatically + fetching the right pre-compiled wheels given your CUDA driver, so add it when + you install everyvoice itself: ```sh - uv pip install torch==2.3.1+cu121 torchaudio==2.3.1+cu121 --find-links https://download.pytorch.org/whl/torch_stable.html + uv pip install . --torch-backend=cu126 ``` -Replace `cu121` above (for CUDA 12.1) by your actual CUDA version tag (cu118 or -cu121), or by `cpu` for a CPU-only installation. +Replace `cu126` above (for CUDA 12.1) by your actual CUDA version tag (cu118, +cu126 or cu128), or by `cpu` for a CPU-only installation. Alternatively, you can follow the [PyTorch installation instructions](https://pytorch.org/get-started/locally/) relevant to your hardware. -Make sure you specify the version declared in `requirements.torch.txt`, which is 2.3.1 at the moment, -if you install EveryVoice from GitHub, but 2.1.0 if you install it from PyPI. +Make sure you specify the version declared in `requirements.torch.txt`, which was 2.7.1 when this +document was last updated. #### Non-Python dependencies @@ -196,6 +196,8 @@ Install EveryVoice locally from your cloned sandbox: uv pip install -e . ``` + (possibly with the optional `--torch-backend=cu126` option discussed above) + #### Dev dependencies Before you can run the test suites, you'll also need to install the dev dependencies: diff --git a/everyvoice/model/feature_prediction/FastSpeech2_lightning b/everyvoice/model/feature_prediction/FastSpeech2_lightning index 0a95bb80..0f334ee8 160000 --- a/everyvoice/model/feature_prediction/FastSpeech2_lightning +++ b/everyvoice/model/feature_prediction/FastSpeech2_lightning @@ -1 +1 @@ -Subproject commit 0a95bb80c64fa5a88bd6376e54277fbfef84d5c9 +Subproject commit 0f334ee80dbf0aa44bfa1aff1d6533751ad28f0c diff --git a/everyvoice/model/vocoder/HiFiGAN_iSTFT_lightning b/everyvoice/model/vocoder/HiFiGAN_iSTFT_lightning index c5073813..c4939894 160000 --- a/everyvoice/model/vocoder/HiFiGAN_iSTFT_lightning +++ b/everyvoice/model/vocoder/HiFiGAN_iSTFT_lightning @@ -1 +1 @@ -Subproject commit c50738135279a5544405b12ad585207f91b1c5ee +Subproject commit c493989454dc222d14662aca587657dd8e943958 diff --git a/make-everyvoice-env b/make-everyvoice-env index 38f00857..4784c10b 100755 --- a/make-everyvoice-env +++ b/make-everyvoice-env @@ -185,7 +185,7 @@ else else echo "Warning: Mismatched CUDA version found. Specified: CUDA_VERSION=$CUDA_VERSION. Found:" nvidia-smi | grep CUDA - echo "Please make sure the CUDA version available at runtime will match $CUDA_VERSION." + echo "Please make sure the CUDA version available at runtime will be compatible with $CUDA_VERSION." fi else echo "Please make sure the CUDA version installed on your system matches CUDA_VERSION=$CUDA_VERSION." @@ -217,6 +217,8 @@ if [[ $USE_UV ]]; then r uv venv --python-preference=only-managed --python="$PYTHON_VERSION" "$ENV_PREFIX" r source "$ENV_PREFIX"/*/activate + # Note, adding `--torch-backend=$CUDA_TAG` to `uv pip install` would replace this block + # for uv>=0.6.9, but let's maintain backward compatibility in this automated script! if [[ $CUDA_TAG ]]; then TEMP_REQS_DIR=$(mktemp -d ./torch-reqs.XXXXXX) sed 's/\${CUDA_TAG}/'"$CUDA_TAG/" requirements.torch.txt > "$TEMP_REQS_DIR/requirements.torch.txt"