Skip to content

chore: restrict torch version to below 2.4 in dependencies (fix the libcudnn dependencies common issue) #1133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

jim60105
Copy link
Contributor

@jim60105 jim60105 commented May 4, 2025

A recent commit cd59f21 downgraded ctranslate2 to version 4.4.0, meaning we will remain on cudnn8.

torch depends on libcudnn9 from version 2.4.0 onward.
If we restrict torch<2.4.0, there is no need to manually install libcudnn8 and also save about 1GB disk space.

This PR:

  • Update torch dependency to be below version 2.4.0 instead of at least 2.5.1
  • Change torchaudio dependency to have no minimum version specified
  • restrict onnxruntime to version 1.19 for python 3.9 compatibility

Related #1087, #1158

@jim60105
Copy link
Contributor Author

jim60105 commented Jun 5, 2025

@Barabazs This PR addresses the issue you mentioned in commit 6fe0a87

@jim60105 jim60105 changed the title chore: restrict torch version to below 2.4 in dependencies chore: restrict torch version to below 2.4 in dependencies (fix the libcudnn dependencies common issue) Jun 13, 2025
jim60105 added 2 commits June 30, 2025 07:35
torch depends on libcudnn9 from version 2.4.0 onward.
If we restrict torch<2.4.0, there is no need to manually install libcudnn8 and also save about 1GB disk space.
restrict onnxruntime to version 1.19 for python 3.9 compatibility

- Update torch dependency to be below version 2.4.0 instead of at least 2.5.1
- Change torchaudio dependency to have no minimum version specified
- Restrict the onnxruntime dependency to versions >=1.19 and <1.20.0 to avoid potential compatibility issues.

Signed-off-by: CHEN, CHUN <[email protected]>
…n README"

This reverts commit 6fe0a87.

Revert the commit now that the issue is fixed.

Signed-off-by: CHEN, CHUN <[email protected]>
@jim60105

This comment was marked as outdated.

@jim60105
Copy link
Contributor Author

After running uv lock --upgrade today, I received this build error.

Build fails due to torch vulnerability CVE-2025-32434 requiring PyTorch v2.6+ upgrade

This issue was opened in my own repo because it comes from my own script.
However the content of the script is excerpted from the WhisperX project, so it should also occur here.

After carefully reading the CVE, I believe upgrading to torch >= 2.6.0 has become a MUST, so I will now abandon this PR.
The current version on the main branch is torch 2.5.1; I will provide another PR for torch >= 2.6.0 separately.

In addition, the limitation I mentioned in PR #1098 is likely to be encountered again. I will double-check the version dependencies in detail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant