Skip to content

build base images for torch 2.7.1#2764

Merged
winglian merged 7 commits into
mainfrom
torch-2.7.1-base
Jun 11, 2025
Merged

build base images for torch 2.7.1#2764
winglian merged 7 commits into
mainfrom
torch-2.7.1-base

Conversation

@winglian
Copy link
Copy Markdown
Collaborator

@winglian winglian commented Jun 5, 2025

PyTorch 2.7.1 is out! Adds base docker image builds replacing 2.7.0

Summary by CodeRabbit

  • Chores
    • Updated the CI/CD pipeline to use PyTorch version 2.7.1 for improved compatibility in select build configurations.
    • Upgraded Docker images and installation scripts to support PyTorch version 2.7.1, including conditional installation of the flash-attn package and added psutil package installation.
    • Updated documentation to reflect the new recommended PyTorch version for Blackwell GPUs.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PyTorch version was updated from 2.7.0 to 2.7.1 across multiple components: the GitHub Actions CI/CD workflow, Docker base images, and related documentation. The update affects the build matrix, conditional package installation, Dockerfile installations, and recommended Docker image tags for Blackwell GPUs. Additionally, a timeout was added to CI jobs, and the psutil package was added to the UV base Docker image.

Changes

File(s) Change Summary
.github/workflows/base.yml Added 8-hour timeout to build jobs; updated PyTorch version to 2.7.1 in build matrix.
docker/Dockerfile-base, docker/Dockerfile-uv-base Changed flash-attn install condition to PyTorch 2.7.1; added psutil installation in uv-base Dockerfile.
docker/Dockerfile-base-next Upgraded PyTorch installation to version 2.7.1 in pip command.
docs/docker.qmd Updated docs to recommend PyTorch 2.7.1 for Blackwell GPUs.

Suggested labels

documentation

Poem

A hop and a jump, a version anew,
PyTorch hops up—2.7.1, woohoo!
In the CI garden, the builds run bright,
CUDA and Python, all set just right.
With each little tweak, our code grows strong—
The rabbit approves, and hops along! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 90b6c18 and 1053786.

📒 Files selected for processing (1)
  • .github/workflows/base.yml (4 hunks)

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@winglian winglian requested review from NanoCode012 and djsaunde June 5, 2025 16:35
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
.github/workflows/base.yml (1)

121-127: 💡 Verification agent

🧩 Analysis chain

Upgrade PyTorch version to 2.7.1 for UV base image
The build-base-uv job now targets PyTorch 2.7.1 on CUDA 12.8.1. Verify that docker/Dockerfile-uv-base consumes the PYTORCH_VERSION build-arg so this bump is applied.


🏁 Script executed:

#!/bin/bash
# Verify Dockerfile-uv-base uses the PYTORCH_VERSION build argument
grep -R "ARG PYTORCH_VERSION" docker/Dockerfile-uv-base
grep -R "PYTORCH_VERSION" docker/Dockerfile-uv-base

Length of output: 215


Update default PyTorch version in Dockerfile-uv-base

The Dockerfile already consumes PYTORCH_VERSION, but its default remains at 2.6.0. Please bump it to match the workflow’s 2.7.1 target.

• File: docker/Dockerfile-uv-base

- ARG PYTORCH_VERSION="2.6.0"
+ ARG PYTORCH_VERSION="2.7.1"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7909bfb and 5122658.

📒 Files selected for processing (1)
  • .github/workflows/base.yml (2 hunks)
🔇 Additional comments (1)
.github/workflows/base.yml (1)

53-59: Upgrade PyTorch version to 2.7.1 for CUDA 12.8.1
The matrix entry for CUDA 12.8.1 has been bumped to PyTorch 2.7.1. Confirm that docker/Dockerfile-base picks up this version via the PYTORCH_VERSION build-arg.

Use the same verification script as above to ensure the Dockerfile references PYTORCH_VERSION.

Comment on lines 49 to 52
python_version: "3.11"
pytorch: 2.7.0
pytorch: 2.7.1
torch_cuda_arch_list: "7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX"
dockerfile: "Dockerfile-base"
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.

💡 Verification agent

🧩 Analysis chain

Upgrade PyTorch version to 2.7.1 for CUDA 12.6.3
This matrix entry now targets PyTorch 2.7.1 under CUDA 12.6.3 and Python 3.11, matching the PR’s goal. Please verify that docker/Dockerfile-base correctly consumes the PYTORCH_VERSION build-arg so the image actually uses 2.7.1.


🏁 Script executed:

#!/bin/bash
# Verify Dockerfile-base uses the PYTORCH_VERSION build argument
grep -R "ARG PYTORCH_VERSION" docker/Dockerfile-base
grep -R "PYTORCH_VERSION" docker/Dockerfile-base

Length of output: 365


Update Dockerfile-base default PyTorch version to 2.7.1

The workflow matrix now installs PyTorch 2.7.1, but docker/Dockerfile-base still defaults to 2.1.2. Please update the build-arg and any related conditionals so the image actually uses 2.7.1:

• File: docker/Dockerfile-base

  • Change the default ARG:
    - ARG PYTORCH_VERSION="2.1.2"
    + ARG PYTORCH_VERSION="2.7.1"
  • Update any version checks (e.g. if [ "$PYTORCH_VERSION" = "2.7.0" ]) to 2.7.1 or remove if no longer needed.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In docker/Dockerfile-base around the ARG PYTORCH_VERSION declaration and any
conditional logic checking the PyTorch version, update the default
PYTORCH_VERSION build-arg from 2.1.2 to 2.7.1. Also, modify or remove any
version-specific conditionals that check for 2.7.0 to reflect 2.7.1 or to
simplify if those checks are no longer necessary. This ensures the Docker image
build uses PyTorch 2.7.1 as specified in the workflow matrix.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2025

@github-actions github-actions Bot temporarily deployed to preview June 5, 2025 22:00 Inactive
@github-actions github-actions Bot temporarily deployed to preview June 5, 2025 22:09 Inactive
@github-actions github-actions Bot temporarily deployed to preview June 7, 2025 05:17 Inactive
@winglian winglian force-pushed the torch-2.7.1-base branch from 9bdf279 to 90b6c18 Compare June 9, 2025 20:35
@github-actions github-actions Bot temporarily deployed to preview June 9, 2025 20:38 Inactive
@winglian winglian merged commit 581dd32 into main Jun 11, 2025
2 of 18 checks passed
@winglian winglian deleted the torch-2.7.1-base branch June 11, 2025 21:11
@github-actions github-actions Bot temporarily deployed to preview June 11, 2025 21:13 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants