Skip to content

ci: Add CUDA 13.1 CI container support#2465

Closed
bkryu wants to merge 5 commits intoflashinfer-ai:mainfrom
bkryu:cu131_container
Closed

ci: Add CUDA 13.1 CI container support#2465
bkryu wants to merge 5 commits intoflashinfer-ai:mainfrom
bkryu:cu131_container

Conversation

@bkryu
Copy link
Copy Markdown
Collaborator

@bkryu bkryu commented Feb 2, 2026

📌 Description

Description:
This PR adds support for CUDA 13.1 CI containers based on the newly released nvidia/cuda:13.1.1-devel-ubuntu24.04 base image.

Changes:

  • Added docker/Dockerfile.cu131 and docker/Dockerfile.cu131.dev following the existing cu130 pattern
  • Added .devcontainer/cu131/devcontainer.json for local development
  • Updated ci/docker-tags.yml with the cu131 image entry
  • Updated .github/workflows/release-ci-docker.yml to build and publish cu131 images
  • Updated docker/install/install_python_packages.sh to install cuda-python==13.1 for cu131 containers (previously all cu13* used 13.0)

🔍 Related Issues

🚀 Pull Request Checklist

Thank you for contributing to FlashInfer! Before we review your pull request, please make sure the following items are complete.

✅ Pre-commit Checks

  • I have installed pre-commit by running pip install pre-commit (or used your preferred method).
  • I have installed the hooks with pre-commit install.
  • I have run the hooks manually with pre-commit run --all-files and fixed any reported issues.

If you are unsure about how to set up pre-commit, see the pre-commit documentation.

🧪 Tests

  • Tests have been added or updated as needed.
  • All tests are passing (unittest, etc.).

Reviewer Notes

Summary by CodeRabbit

  • New Features
    • Adds a CUDA 13.1.1 development container with GPU support, preloaded VS Code tooling (C/C++/Python/NVIDIA), Python 3.12 conda env, MPI, enhanced developer shell (zsh/Oh My Zsh), and SSH access support.
  • Chores
    • CI updated to build, tag, and publish CUDA 13.1.1 images; package install scripts and container build steps adjusted for explicit cu131 dependencies.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bkryu, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's infrastructure by integrating support for CUDA 13.1. This update allows the project to leverage the latest advancements in NVIDIA's GPU computing platform, ensuring that both automated testing and developer workflows can utilize the most current CUDA capabilities. The changes primarily involve setting up new container images and development environments, expanding the project's compatibility and future-proofing its GPU-accelerated components.

Highlights

  • CUDA 13.1 Support: Introduced comprehensive support for CUDA 13.1, enabling the use of the latest NVIDIA CUDA toolkit in both CI and local development environments.
  • New Dockerfiles: Added Dockerfile.cu131 for CI and Dockerfile.cu131.dev for development, mirroring the existing patterns for previous CUDA versions and based on nvidia/cuda:13.1.1-devel-ubuntu24.04.
  • Devcontainer Configuration: Created a new .devcontainer/cu131/devcontainer.json to provide a ready-to-use development environment for CUDA 13.1, pre-configured with essential VS Code extensions and GPU access.
  • CI/CD Integration: Updated ci/docker-tags.yml and .github/workflows/release-ci-docker.yml to ensure the new CUDA 13.1 images are built, tagged, and published as part of the continuous integration process.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/release-ci-docker.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

Adds explicit CUDA 13.1.1 (cu131) support: new devcontainer and Dockerfiles, CI matrix and tag updates, and adjustments to the Python package install script for explicit cu131/cu130 branches.

Changes

Cohort / File(s) Summary
Devcontainer
.devcontainer/cu131/devcontainer.json
New devcontainer config for cu131 that builds from docker/Dockerfile.cu131.dev, enables GPUs (--gpus=all), preloads VSCode extensions, mounts ~/.ssh read-only, and sets remoteUser to devuser.
Dockerfiles
docker/Dockerfile.cu131, docker/Dockerfile.cu131.dev
New CUDA 13.1.1 Dockerfiles based on nvidia/cuda:13.1.1-devel-ubuntu24.04. Base adds Python 3.12 conda env, MPI (mpich, mpi4py); dev variant adds dev tooling, non-root devuser, zsh/Oh My Zsh, clangd, and shell setup.
Install script
docker/install/install_python_packages.sh
Replaces generic cu13 wildcard with explicit cu131 branch (and cu130 branch). cu131 installs cuda-python 13.1.* and sets nvidia-cudnn-cu13>=9.18.1.3.
CI / Tags
.github/workflows/release-ci-docker.yml, ci/docker-tags.yml
Adds cu131 to CI matrices and manifest steps; adds flashinfer/flashinfer-ci-cu131 entry to ci/docker-tags.yml; updates Docker tag generation, PR branch naming, and manifest/PR templating to include cu131.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer (local)
    participant VSCode as VSCode Remote
    participant CI as GitHub Actions
    participant Registry as Docker Registry

    Dev->>VSCode: Open repo & start devcontainer (cu131)
    VSCode->>Registry: Build image from `docker/Dockerfile.cu131.dev`
    CI->>CI: Run release-ci-docker matrix including cuda=cu131
    CI->>Registry: Build & push `flashinfer-ci-cu131:DATE_SHA`
    CI->>Repo: Open/Update PR for manifests/tags including cu131
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

docker

Suggested reviewers

  • cyx-6
  • nvmbreughe
  • yzh119

Poem

🐇 I hopped into containers bright,

Built CUDA stars late at night,
GPUs snug, Python in tow,
MPI sings — onward we go,
A carrot for every byte!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding CUDA 13.1 CI container support, which aligns with all file changes in the changeset.
Description check ✅ Passed The description is well-structured, covers all major changes with clear bullet points, includes pre-commit and testing checklists completed, and follows the repository template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Copy Markdown
Contributor

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

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 adds support for CUDA 13.1 CI containers, which is a welcome addition. The changes primarily involve adding new Dockerfiles and configuration files that follow the existing pattern for other CUDA versions. I've identified a couple of opportunities to improve the new Dockerfiles by applying best practices for efficiency and image size reduction. My specific comments provide details and code suggestions for these improvements.

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

🤖 Fix all issues with AI agents
In `@docker/Dockerfile.cu131.dev`:
- Around line 44-45: The ENV PATH lines that reference $USERNAME (the two lines
setting PATH) will not expand the ARG at build time and will literally store
“$USERNAME”; change them so the build-time ARG is expanded via a RUN step (e.g.,
use ARG USERNAME then a RUN that updates /etc/profile.d or modifies
/home/$USERNAME/.bashrc or symlinks to conda/bin to a static location) or
replace with the actual username string (e.g., devuser) directly in the ENV PATH
values; update the two ENV PATH entries to either be hardcoded or removed and
instead set PATH from a RUN that appends the expanded path for the ARG USERNAME
so the correct paths are available at runtime.
🧹 Nitpick comments (2)
docker/Dockerfile.cu131 (1)

6-9: Consider adding apt cache cleanup for smaller image size.

The dev Dockerfile (Dockerfile.cu131.dev) includes && rm -rf /var/lib/apt/lists/* after apt-get install, but this file doesn't. Adding cleanup would reduce the final image size and maintain consistency.

♻️ Proposed fix
 RUN apt-get update && apt-get install -y \
     curl \
     git \
-    wget
+    wget \
+    && rm -rf /var/lib/apt/lists/*
.devcontainer/cu131/devcontainer.json (1)

2-2: Use CUDA version-specific container names for clarity.

All devcontainer configurations currently use the generic name "CUDA Development Container" regardless of CUDA version. Consider updating to version-specific names (e.g., "CUDA 13.1 Development Container") to improve clarity when multiple containers are listed in development tools or Docker clients.

♻️ Proposed fix
 {
-    "name": "CUDA Development Container",
+    "name": "CUDA 13.1 Development Container",
     "build": {

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

🤖 Fix all issues with AI agents
In `@docker/install/install_python_packages.sh`:
- Around line 32-35: The CUDA 13.1 branch uses an invalid `cuda-python==13.1`
spec and an incorrect cuDNN constraint; update the cu131 branch so when
`CUDA_VERSION` == "cu131" the pip installs use a valid cuda-python version
(e.g., `cuda-python==13.1.0`) and the cu13 cudnn package supporting CUDA 13.1
(use `nvidia-cudnn-cu13>=9.18.1.3`), keeping the installs tied to the
`CUDA_VERSION` conditional and using the existing `CUDA_VERSION` check and pip3
install commands to locate where to change.

@bkryu bkryu marked this pull request as draft February 2, 2026 19:48
@bkryu
Copy link
Copy Markdown
Collaborator Author

bkryu commented Mar 12, 2026

Closing in favor of #2774

@bkryu bkryu closed this Mar 12, 2026
@yongwww
Copy link
Copy Markdown
Member

yongwww commented Mar 12, 2026

sorry I didn't notice this

@bkryu bkryu deleted the cu131_container branch March 17, 2026 22:12
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.

2 participants