Skip to content

Publish CPU docker images for PyTorch 2.13.0 - #2099

Merged
csukuangfj merged 5 commits into
masterfrom
docker-cpu-2
Jul 14, 2026
Merged

csukuangfj merged 5 commits into
masterfrom
docker-cpu-2

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

See https://github.com/k2-fsa/icefall/pkgs/container/icefall

Screenshot 2026-07-14 at 19 26 24

Summary by CodeRabbit

  • New Features

    • Added support for newer Python versions, including Python 3.13–3.15.
    • Expanded compatibility with newer PyTorch, Torchaudio, K2, and Kaldifeat releases.
    • Added downloadable piper-phonemize 1.4.1 packages for supported platforms.
  • Build & Reliability

    • Updated container builds to use Python 3.10 and newer audio and machine-learning components.
    • Added automatic CPU container builds when changes are pushed to the Docker CPU branch.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36543dff-1486-4692-be62-2fecb7d1ff56

📥 Commits

Reviewing files that changed from the base of the PR and between 0a9a404 and e8b1ea8.

📒 Files selected for processing (4)
  • .github/scripts/docker/Dockerfile
  • .github/scripts/docker/generate_build_matrix.py
  • .github/scripts/generate-piper-phonemize-page.py
  • .github/workflows/build-cpu-docker.yml

📝 Walkthrough

Walkthrough

The 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.

Changes

Build toolchain updates

Layer / File(s) Summary
Build matrix compatibility
.github/scripts/docker/generate_build_matrix.py
Adds newer Python and Torch versions, updates compatibility gates, and selects Torchaudio, K2, and Kaldifeat versions per Torch version.
Docker dependency configuration
.github/scripts/docker/Dockerfile
Updates Python and dependency build arguments and unpins onnx and onnxruntime.
CPU Docker workflow trigger
.github/workflows/build-cpu-docker.yml
Runs the workflow on pushes to the docker-cpu branch in addition to manual dispatches.

Phonemize release page

Layer / File(s) Summary
v1.4.1 wheel links
.github/scripts/generate-piper-phonemize-page.py
Generates sorted v1.4.1 wheel URLs and includes them in the generated HTML link list.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: henryvarro666

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docker-cpu-2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@csukuangfj
csukuangfj merged commit 4e161bc into master Jul 14, 2026
50 of 185 checks passed
@csukuangfj
csukuangfj deleted the docker-cpu-2 branch July 14, 2026 11:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +61 to 65
elif version_ge(torch_version, "2.11"):
# torchaudio only has versions up to 2.11.0
return "2.11.0"
else:
return torch_version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

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"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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"]

Comment on lines +141 to +143
# torch>=2.9 drops python 3.9
if not version_gt(p, "3.9") and version_ge(t, "2.9"):
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This check is redundant. The existing check at lines 137-139 already filters out Python versions < 3.10 (which includes 3.8 and 3.9) for any PyTorch version > 2.4 (which includes 2.9 and above). We can safely remove this redundant block to keep the code clean.

Comment on lines +149 to +151
# only torch>=2.13.0 supports python 3.15
if version_gt(p, "3.14") and not version_ge(t, "2.13"):
continue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since Python 3.15 is not supported and should be removed from python_version, this check is no longer needed and can be removed.

Comment on lines +132 to +133
ans = [prefix + f for f in files]
return ans

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
ans = [prefix + f for f in files]
return ans
ans = [prefix + f for f in files]
ans.sort()
return ans

Comment on lines +58 to +60
onnx \
onnxmltools \
onnxruntime==1.17.1 \
onnxruntime \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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 \

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