Skip to content

Commit

Permalink
feat: removing requirements.torch.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Nov 19, 2024
1 parent 2e6a148 commit d71236f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Install dependencies and package
run: |
pip install --upgrade pip
CUDA_TAG=cpu pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
pip install .[cpu] --find-links https://download.pytorch.org/whl/torch_stable.html
pip install cython
pip install -e .
- name: Install documentation dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
conda install -y sox $(grep "pycountry\|pyworld" requirements.txt) -c conda-forge
- name: Install dependencies and package
run: |
CUDA_TAG=cpu pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
pip install .[cpu] --find-links https://download.pytorch.org/whl/torch_stable.html
pip install -e .[dev]
pip install coverage
- run: pip freeze
Expand Down
3 changes: 2 additions & 1 deletion make-everyvoice-env
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ if ! r pip install lit --find-links https://download.pytorch.org/whl/torch_stabl
r pip install lit==15.0.7 --find-links https://download.pytorch.org/whl/torch_stable.html
fi

r CUDA_TAG=$CUDA_TAG pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
# r CUDA_TAG=$CUDA_TAG pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
r pip install .["$CUDA_TAG"] --find-links https://download.pytorch.org/whl/torch_stable.html
r pip install cython

# pycountry and pyworld don't always compile cleanly, but we can fall back to
Expand Down
30 changes: 23 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ dependencies = [
dynamic = ["version"]

[project.optional-dependencies]
# [Specifying GPU version of pytorch for python package in pyproject.toml](https://discuss.pytorch.org/t/specifying-gpu-version-of-pytorch-for-python-package-in-pyproject-toml/209157)
torch = [
# these requirements have to be installed ahead of time in your environment and from a different URL:
# CUDA_TAG=cu118 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
'torch==2.1.0; sys_platform == "darwin"',
'torchaudio==2.1.0; sys_platform == "darwin"',
]
# torch = [
# # these requirements have to be installed ahead of time in your environment and from a different URL:
# # CUDA_TAG=cu118 pip install -r requirements.torch.txt --find-links https://download.pytorch.org/whl/torch_stable.html
# 'torch==2.1.0; sys_platform == "darwin"',
# 'torchaudio==2.1.0; sys_platform == "darwin"',
# ]
dev = [
"black~=24.3",
"flake8>=4.0.1",
Expand All @@ -104,6 +103,23 @@ dev = [
"everyvoice[test]",
]
test = ["jsonschema>=4.17.3", "pep440>=0.1.2"]
# [Specifying GPU version of pytorch for python package in pyproject.toml](https://discuss.pytorch.org/t/specifying-gpu-version-of-pytorch-for-python-package-in-pyproject-toml/209157)
darwin = [
"torch==2.1.0; sys_platform == 'darwin'",
"torchaudio==2.1.0; sys_platform == 'darwin'",
]
cpu = [
"torch==2.1.0+cpu; sys_platform != 'darwin'",
"torchaudio==2.1.0+cpu; sys_platform != 'darwin'",
]
cu118 = [
"torch==2.1.0+cu118; sys_platform != 'darwin'",
"torchaudio==2.1.0+cu118; sys_platform != 'darwin'",
]
cu121 = [
"torch==2.1.0+cu121; sys_platform != 'darwin'",
"torchaudio==2.1.0+cu121; sys_platform != 'darwin'",
]

[project.scripts]
everyvoice = "everyvoice.cli:app"
Expand Down
6 changes: 0 additions & 6 deletions requirements.torch.txt

This file was deleted.

0 comments on commit d71236f

Please sign in to comment.