Publish CPU docker images for PyTorch 2.13.0 - #2099
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe build matrix now supports newer Python and Torch releases with updated compatibility rules and package selection. Docker dependencies and workflow triggers were updated, and the phonemize release page now includes v1.4.1 wheel links. ChangesBuild toolchain updates
Phonemize release page
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Dockerfile and build matrix generation scripts to support newer Python (up to 3.15) and PyTorch (up to 2.13.0) versions, unpins ONNX dependencies, and adds support for piper-phonemize version 1.4.1. Feedback on these changes includes correcting the torchaudio version resolution logic for PyTorch >= 2.12.0 to prevent dependency resolution failures, removing unsupported Python 3.15 and its associated redundant checks, eliminating redundant Python version checks for PyTorch >= 2.9, pinning onnx and onnxruntime with version ranges to ensure reproducible builds, and sorting the list of files in get_v1_4_1_files() for consistency.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| elif version_ge(torch_version, "2.11"): | ||
| # torchaudio only has versions up to 2.11.0 | ||
| return "2.11.0" | ||
| else: | ||
| return torch_version |
There was a problem hiding this comment.
For PyTorch versions 2.12.0 and 2.13.0, returning "2.11.0" for torchaudio will cause a dependency resolution failure during the Docker build. torchaudio has strict version requirements matching the major and minor version of torch (e.g., torchaudio 2.13.x requires torch 2.13.x). Since PyTorch and Torchaudio are released in lockstep, Torchaudio 2.12.0 and 2.13.0 should be available. We should allow the version to fall through to match the torch_version.
else:
return torch_version|
|
||
| # torchaudio 2.5.0 does not support python 3.13 | ||
| python_version = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
| python_version = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] |
There was a problem hiding this comment.
Python 3.15 is not yet released or supported by PyTorch 2.13.0. Furthermore, piper_phonemize does not have cp315 wheels available in generate-piper-phonemize-page.py, which will cause the Docker build to fail when installing dependencies. Please remove "3.15" from the list of supported Python versions.
| python_version = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] | |
| python_version = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] |
| # torch>=2.9 drops python 3.9 | ||
| if not version_gt(p, "3.9") and version_ge(t, "2.9"): | ||
| continue |
There was a problem hiding this comment.
| # only torch>=2.13.0 supports python 3.15 | ||
| if version_gt(p, "3.14") and not version_ge(t, "2.13"): | ||
| continue |
| ans = [prefix + f for f in files] | ||
| return ans |
There was a problem hiding this comment.
For consistency with get_v1_3_0_files() and get_v1_2_0_files(), we should sort the list of files in get_v1_4_1_files() before returning them. This ensures the generated HTML page remains clean and organized.
| ans = [prefix + f for f in files] | |
| return ans | |
| ans = [prefix + f for f in files] | |
| ans.sort() | |
| return ans |
| onnx \ | ||
| onnxmltools \ | ||
| onnxruntime==1.17.1 \ | ||
| onnxruntime \ |
There was a problem hiding this comment.
Unpinning onnx and onnxruntime completely can lead to non-reproducible Docker builds and potential compatibility issues in the future when new major/minor versions of these packages are released. It is highly recommended to use version ranges (e.g., matching those in requirements.txt) to ensure build stability.
onnx>=1.15.0 \
onnxmltools \
onnxruntime>=1.16.3 \
See https://github.com/k2-fsa/icefall/pkgs/container/icefall
Summary by CodeRabbit
New Features
Build & Reliability