-
Hi all, I've got a project I'm working on that depends on Open AI's Whisper. Currently it's only installable as a git source. It depends on PyTorch, but to run it with cuda I need to install the cuda version of PyTorch. When I add whisper, it correctly resolves torch as a dependency.
but they're not officially listed in the pyproject.toml file: dependencies = [
"whisper @ git+https://github.com/openai/whisper.git",
"typer[all]>=0.6.1",
"deepdiff>=6.2.1",
"ruamel.yaml>=0.17.21",
"yaspin>=2.2.0",
"schema>=0.7.5",
"tqdm>=4.64.1",
"pydavinci @ git+https://github.com/in03/pydavinci",
"pyfiglet>=0.8.post1",
"requests>=2.28.1",
"numpy>=1.23.4",
"transformers>=4.23.1",
"more-itertools>=9.0.0",
"setuptools>=65.5.0",
"notify-py>=0.3.2",
"commonregex>=1.5.4",
] If I try to remove torch so I can install the cuda version,
Any suggestions? I'd like this to be easily installed by others without having to do the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Using overrides should do the trick: [tool.pdm.overrides]
torch = "https://download.pytorch.org/whl/cu102/torch-1.12.1%2Bcu102-cp39-cp39-linux_x86_64.whl" Or, if you want PDM to resolve corresponding wheels for different python versions or platforms, you can do this: [[tool.pdm.source]]
url = "https://download.pytorch.org/whl/cu116"
verify_ssl = true
name = "pytorch"
[tool.pdm.overrides]
torch = "1.12.1+cu116" |
Beta Was this translation helpful? Give feedback.
Using overrides should do the trick:
Or, if you want PDM to resolve corresponding wheels for different python versions or platforms, you can do this: