add support for base image with uv#2691
Conversation
WalkthroughThe changes update the GitHub Actions workflow for building Docker images, making Dockerfile selection explicit in the build matrices and streamlining build steps. Additionally, a new Dockerfile, Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Docker Hub
participant Docker Buildx
GitHub Actions->>GitHub Actions: Checkout code
GitHub Actions->>GitHub Actions: Generate Docker metadata
GitHub Actions->>Docker Hub: Login
GitHub Actions->>Docker Buildx: Setup Buildx
GitHub Actions->>Docker Buildx: Build and push image using matrix-defined Dockerfile
Docker Buildx->>Docker Hub: Push image
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
🔭 Outside diff range comments (1)
.github/workflows/base.yml (1)
8-13: 🛠️ Refactor suggestionUpdate push paths to include the new Dockerfile
The current push and pull_request paths only monitor 'Dockerfile-base' and '.github/workflows/base.yml', but not the new 'docker/Dockerfile-uv-base'. This means changes to the new Dockerfile won't automatically trigger the workflow.
paths: - 'Dockerfile-base' + - 'docker/Dockerfile-uv-base' - '.github/workflows/base.yml' pull_request: paths: - 'Dockerfile-base' + - 'docker/Dockerfile-uv-base' - '.github/workflows/base.yml'
🧹 Nitpick comments (3)
docker/Dockerfile-uv-base (3)
1-4: Consider using the MAX_JOBS argumentThe MAX_JOBS argument is defined here but not used anywhere in the Dockerfile. Either use it to control build parallelism (e.g., for pip/uv install commands) or remove it if it's not needed.
1-37: Consider adding a CUDA verification stepSince this is a CUDA-enabled image, it would be helpful to add a verification step at the end of the Dockerfile to ensure CUDA is working correctly.
You could add:
+# Verify CUDA installation +RUN python -c "import torch; print('CUDA available:', torch.cuda.is_available()); print('CUDA version:', torch.version.cuda); print('Device count:', torch.cuda.device_count())"
1-37: Consider creating a non-root userFor improved security, consider creating and using a non-root user for the final image, especially if this will be used in production environments.
You could add:
+# Create non-root user +RUN useradd -m -u 1000 axolotl +USER axolotl +WORKDIR /home/axolotl/workspace
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (2)
.github/workflows/base.yml(3 hunks)docker/Dockerfile-uv-base(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/base.yml
86-86: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
93-93: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
109-109: label "axolotl-gpu-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: PyTest from Source Dist (3.11, 2.7.0)
- GitHub Check: PyTest (3.11, 2.7.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
- GitHub Check: PyTest (3.11, 2.6.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.5.1)
- GitHub Check: PyTest (3.11, 2.5.1)
🔇 Additional comments (5)
docker/Dockerfile-uv-base (1)
17-20: Good practice on system package installationThe approach of cleaning up apt cache with
rm -rf /var/lib/apt/lists/*is a good practice to reduce the image size..github/workflows/base.yml (4)
31-31: Good practice: Explicit Dockerfile specificationAdding explicit dockerfile fields to the matrix entries makes it much clearer which Dockerfile is used for each configuration. This improves maintainability and readability.
Also applies to: 38-38, 45-45, 52-52, 59-59, 66-66, 74-74
107-151: Great implementation of the uv-based imageThe separate build job for the uv-based image is well structured, reusing components from the main build job while targeting the specific uv toolchain needs. This provides a clean way to maintain both pip and uv-based images.
🧰 Tools
🪛 actionlint (1.7.7)
109-109: label "axolotl-gpu-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
131-131: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
138-138: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
143-143: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
109-109: Note about custom runner labelThe workflow uses a custom runner label "axolotl-gpu-runner". While this is flagged by the static analyzer, it's likely a custom self-hosted runner specific to your environment, so this can be safely ignored.
🧰 Tools
🪛 actionlint (1.7.7)
109-109: label "axolotl-gpu-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
120-120:Details
✅ Verification successful
Confirm dockerfile path is correct
The dockerfile value is "Dockerfile-uv-base", but the file path in the build step is "./docker/${{ matrix.dockerfile }}". Ensure that this path accurately reflects where the file is located.
Let's verify the repository structure to confirm the correct path:
🏁 Script executed:
#!/bin/bash # Check if the file exists at the expected location find . -name "Dockerfile-uv-base"Length of output: 61
Confirmed: Dockerfile path is correct
The file
Dockerfile-uv-baseexists at./docker/Dockerfile-uv-base, which matches the workflow’s./docker/${{ matrix.dockerfile }}path. No changes needed.
| ARG PYTHON_VERSION="3.11" | ||
| ARG PYTORCH_VERSION="2.6.0" | ||
| ARG CUDA="126" | ||
| ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX" |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Ensure TORCH_CUDA_ARCH_LIST matches workflow definition
The CUDA architecture list here (7.0 7.5 8.0 8.6 9.0+PTX) doesn't match what's defined in the workflow file (7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX). This means the image might not be optimized for newer GPU architectures.
-ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX"
+ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX" | |
| - ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 9.0+PTX" | |
| + ARG TORCH_CUDA_ARCH_LIST="7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX" |
🤖 Prompt for AI Agents
In docker/Dockerfile-uv-base at line 11, update the TORCH_CUDA_ARCH_LIST
argument to include all CUDA architectures defined in the workflow file.
Specifically, add the missing versions 8.7 and 8.9 to the list so it reads "7.0
7.5 8.0 8.6 8.7 8.9 9.0+PTX" to ensure the image is optimized for all targeted
GPU architectures.
| RUN uv pip install packaging setuptools wheel \ | ||
| && uv pip install torch==${PYTORCH_VERSION} \ | ||
| && uv pip install --no-build-isolation "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@main" \ | ||
| && uv pip install "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@main" \ | ||
| && uv pip install awscli pydantic |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider pinning GitHub repositories to specific commits/tags
Installing packages directly from GitHub's main branch (@main) can lead to reproducibility issues if there are breaking changes. Consider pinning to specific commits or tags for better stability.
- && uv pip install --no-build-isolation "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@main" \
- && uv pip install "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@main" \
+ && uv pip install --no-build-isolation "causal_conv1d @ git+https://github.com/Dao-AILab/causal-conv1d.git@v1.0.0" \
+ && uv pip install "mamba_ssm @ git+https://github.com/state-spaces/mamba.git@v1.1.1" \Replace v1.0.0 and v1.1.1 with actual stable release tags or commit hashes.
🤖 Prompt for AI Agents
In docker/Dockerfile-uv-base around lines 32 to 36, the GitHub repositories for
causal_conv1d and mamba_ssm are installed from the main branch, which risks
instability. To fix this, replace the '@main' references with specific commit
hashes or stable release tags for both repositories to ensure reproducible
builds and avoid unexpected breaking changes.
| tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} | ||
| labels: ${{ steps.metadata.outputs.labels }} |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Handle undefined axolotl_extras property
The tags and labels use matrix.axolotl_extras which isn't defined in all matrix entries. This could lead to undefined behavior.
Add a default for axolotl_extras to all matrix entries or modify the tag generation logic:
- tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }}
+ tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras && format('-{0}', matrix.axolotl_extras) || '' }}Also applies to: 143-144
🧰 Tools
🪛 actionlint (1.7.7)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
🤖 Prompt for AI Agents
In .github/workflows/base.yml at lines 98-99 and also lines 143-144, the matrix
variable axolotl_extras is used without ensuring it is defined in all matrix
entries, which can cause undefined behavior. Fix this by either adding a default
empty string value for axolotl_extras in every matrix entry or update the tag
and label expressions to safely handle undefined values, for example by using a
default fallback or conditional checks to avoid referencing undefined
properties.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
docs/installation.qmd (5)
40-41: Consider adding a brief introduction to uvThe section jumps directly into installation without explaining what uv is or its advantages over standard pip installations. Consider adding a brief introduction explaining that uv is a Python packaging tool that offers faster, more reliable dependency resolution than pip.
### uv Installation {#sec-uv} + +uv is a fast, reliable Python package installer and resolver built in Rust. It offers significant performance improvements over pip and provides better dependency resolution, making it an excellent choice for complex environments.
48-54: Provide more guidance on CUDA version selectionThe documentation mentions different CUDA options but doesn't provide guidance on which version to choose for different scenarios or hardware.
Consider adding a note explaining which CUDA version might be appropriate for different GPU models or PyTorch requirements, such as:
Choose your CUDA version to use with PyTorch; e.g. `cu124`, `cu126`, `cu128`, then create the venv and activate + +Note: Select the CUDA version compatible with your GPU drivers: +- For recent NVIDIA drivers (535+), consider cu128 +- For older drivers, cu126 or cu124 may be more compatible
52-52: Explain the relocatable flagThe
--relocatableflag is used without explanation. Users might not understand what this means or why it's beneficial.-uv venv --no-project --relocatable +uv venv --no-project --relocatable # Creates a portable virtual environment that can be moved to different locations
66-67: Clarify the GRPO abbreviationThe term "GRPO" is used without explanation, which might be unfamiliar to many users.
-# optionally install with vLLM if you're using torch==2.6.0 and want to train w/ GRPO +# optionally install with vLLM if you're using torch==2.6.0 and want to train with GAPP/GRPO (Generative Progressive Policy Optimization)
44-46: Enhance shell compatibility for the installation commandsThe command to source the environment assumes bash/zsh shell and might not work on all systems.
```{.bash} curl -LsSf https://astral.sh/uv/install.sh | sh -source $HOME/.local/bin/env +# For bash/zsh shells +source $HOME/.local/bin/env +# For fish shell +# source $HOME/.local/bin/env.fish</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** **Cache: Disabled due to data retention organization setting** **Knowledge Base: Disabled due to data retention organization setting** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 7090dbbdfe2fc7a34fdec154c8f2e15aee316bcf and fefcb7c25745860df3cae78d40b04fc34c0e81d7. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/installation.qmd` (1 hunks) </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms (8)</summary> * GitHub Check: PyTest from Source Dist (3.11, 2.7.0) * GitHub Check: PyTest (3.11, 2.7.0) * GitHub Check: PyTest from Source Dist (3.11, 2.6.0) * GitHub Check: PyTest (3.11, 2.6.0) * GitHub Check: PyTest from Source Dist (3.11, 2.5.1) * GitHub Check: PyTest (3.11, 2.5.1) * GitHub Check: pre-commit * GitHub Check: preview </details> <details> <summary>🔇 Additional comments (1)</summary><blockquote> <details> <summary>docs/installation.qmd (1)</summary> `40-69`: **Good addition of uv installation instructions** The new section provides clear, structured instructions for installing Axolotl using the uv package manager. This is valuable for users who want faster, more reliable dependency resolution compared to pip. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
| uv pip install packaging setuptools wheel | ||
| uv pip install torch==2.6.0 | ||
| uv pip install awscli pydantic | ||
| ``` |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Consider explaining why specific versions are used
The documentation specifies PyTorch 2.6.0 but doesn't explain why this specific version is recommended. This might confuse users, especially since the requirements section mentions PyTorch ≥2.4.1.
🌐 Web query:
What is the latest stable PyTorch version as of May 2025?
💡 Result:
As of May 2025, the latest stable version of PyTorch is 2.7.0, which was released on April 23, 2025[1]. This represents the most currently tested and supported version of PyTorch available to users.
PyTorch 2.7.0 includes several notable features and improvements. The release also included a follow-up bug fix release, PyTorch 2.7.1, which was released on May 1, 2025 to address specific regressions in the initial release[4].
Prior to this, PyTorch 2.6.0 was released on January 29, 2025, which introduced significant updates including support for torch.compile with Python 3.13, a new performance-related feature called torch.compiler.set_stance, and FP16 support on X86 CPUs[5].
The PyTorch development team follows a consistent release cycle, with each major version bringing new features, improvements, and bug fixes to enhance the deep learning framework's capabilities, performance, and usability.
Citations:
- 1: https://pytorch.org
- 2: https://github.com/pytorch/pytorch/releases
- 3: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/index.html
- 4: https://dev-discuss.pytorch.org/c/release-announcements/27
- 5: https://buttondown.com/weekly-project-news/archive/weekly-github-report-for-pytorch-may-05-2025-may/
- 6: https://github.com/pytorch/vision/releases
- 7: https://github.com/pytorch/torchtune/releases
- 8: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-25-01.html
- 9: https://pytorch.org/get-started/previous-versions/
- 10: https://pytorch.org/get-started/locally/
🏁 Script executed:
#!/bin/bash
# Locate the installation documentation file
fd -e qmd -p 'installation.qmd'
# Show lines containing the PyTorch install command with context
echo "=== pip install torch snippet ==="
rg -n -C3 "pip install torch" docs/installation.qmd
# Show lines 50–70 of the installation document for broader context
echo "=== Context lines 50–70 ==="
sed -n '50,70p' docs/installation.qmd
# Search for references to PyTorch ≥2.4.1 elsewhere in the docs
echo "=== References to '2.4.1' ==="
rg -n "2\.4\.1" docsLength of output: 1286
Clarify PyTorch version pin in installation guide
In docs/installation.qmd (lines 58–61), add a brief note explaining why we pin to torch==2.6.0—even though we list “PyTorch ≥2.4.1” in the requirements:
• File: docs/installation.qmd (lines 58–61)
• Suggested diff:
uv pip install torch==2.6.0
+ # Pin to 2.6.0 for compatibility with vLLM’s GRPO training
+ # and because this version is validated in our CI (see note below).
uv pip install awscli pydanticOptionally, once dependencies (e.g. vLLM, Axolotl) support PyTorch 2.7.0, update this pin and note accordingly.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| uv pip install packaging setuptools wheel | |
| uv pip install torch==2.6.0 | |
| uv pip install awscli pydantic | |
| ``` | |
| uv pip install packaging setuptools wheel | |
| uv pip install torch==2.6.0 | |
| # Pin to 2.6.0 for compatibility with vLLM’s GRPO training | |
| # and because this version is validated in our CI (see note below). | |
| uv pip install awscli pydantic |
🤖 Prompt for AI Agents
In docs/installation.qmd around lines 58 to 61, add a brief explanatory note
after the pip install torch==2.6.0 command clarifying that this specific version
is pinned due to compatibility or stability reasons, despite the general
requirement stating PyTorch ≥2.4.1. Also mention that this pin may be updated in
the future once dependencies like vLLM and Axolotl support PyTorch 2.7.0. This
will help users understand the rationale behind the version choice.
| Install axolotl from PyPi | ||
| ```{.bash} | ||
| uv pip install --no-build-isolation axolotl[deepspeed,flash-attn] | ||
| # optionally install with vLLM if you're using torch==2.6.0 and want to train w/ GRPO |
There was a problem hiding this comment.
| # optionally install with vLLM if you're using torch==2.6.0 and want to train w/ GRPO | |
| # optionally install with vLLM if you're using torch==2.6.0 and want to train w/ GRPO |
Add spacing for easy reading
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
.github/workflows/base.yml (1)
98-99: Handle Undefinedaxolotl_extras
The tag expression referencesmatrix.axolotl_extras, which isn’t defined in yourincludeentries and can yieldnull/undefined. As noted previously, add a safe fallback:--- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -98,1 +98,1 @@ - tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} + tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras && format('-{0}', matrix.axolotl_extras) || '' }} @@ -150,1 +150,1 @@ - tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} + tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras && format('-{0}', matrix.axolotl_extras) || '' }}Also applies to: 150-151
🧰 Tools
🪛 actionlint (1.7.7)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/base.yml(3 hunks)scripts/motd(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- scripts/motd
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/base.yml
86-86: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
93-93: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
109-109: label "axolotl-gpu-runner" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: PyTest (3.11, 2.6.0)
- GitHub Check: PyTest (3.11, 2.5.1)
- GitHub Check: PyTest (3.11, 2.7.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.7.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.5.1)
- GitHub Check: build-base (128, 12.6.3, 3.11, 2.7.0, 7.0 7.5 8.0 8.6 8.7 8.9 9.0+PTX, Dockerfile-base)
🔇 Additional comments (4)
.github/workflows/base.yml (4)
31-31: Explicit Dockerfile Selection Improves Clarity
Specifyingdockerfilein each matrix entry replaces hidden logic with an explicit reference, making it straightforward to see which Dockerfile is used for each configuration.Also applies to: 38-38, 45-45, 52-52, 59-59, 66-66
120-120: New UV Base Image Job Configuration Looks Good
Thebuild-base-uvjob now correctly declares thedockerfileasDockerfile-uv-basein both matrix entries, aligning with the addition of the UV-enabled base image.Also applies to: 127-127
136-136: Consistent Docker Hub Image Naming for UV Base
You’re pushingaxolotlai/axolotl-base-uvhere—consider whether you also need to publish underwinglian/axolotl-base-uv(as in thebuild-basejob), or if this single namespace is intentional.
148-148: Use Matrix Dockerfile for Build Step
Referencing./docker/${{ matrix.dockerfile }}ensures that both base and UV jobs reuse the same build-and-push logic. This DRYs up the workflow nicely.
| winglian/axolotl-base | ||
| axolotlai/axolotl-base | ||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v2 |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Upgrade Docker Login Action
The workflow still uses docker/login-action@v2, which is outdated and may not run on newer runners. Bump to the latest v3 release for improved stability and security:
--- a/.github/workflows/base.yml
+++ b/.github/workflows/base.yml
@@ -86,1 +86,1 @@
- uses: docker/login-action@v2
+ uses: docker/login-action@v3.4.0
@@ -138,1 +138,1 @@
- uses: docker/login-action@v2
+ uses: docker/login-action@v3.4.0Also applies to: 138-138
🧰 Tools
🪛 actionlint (1.7.7)
86-86: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/base.yml at lines 86 and 138, update the Docker login
action from docker/login-action@v2 to docker/login-action@v3 to use the latest
stable version. This involves changing the version tag in the uses field to v3
for improved stability and security on newer runners.
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build | ||
| uses: docker/build-push-action@v4 |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Upgrade Docker Build-Push Action
Similarly, docker/build-push-action@v4 is several major versions behind. Updating to the latest v6 series unlocks performance and feature improvements:
--- a/.github/workflows/base.yml
+++ b/.github/workflows/base.yml
@@ -93,1 +93,1 @@
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v6.15.0
@@ -145,1 +145,1 @@
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v6.15.0Also applies to: 145-145
🧰 Tools
🪛 actionlint (1.7.7)
93-93: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In .github/workflows/base.yml at lines 93 and 145, the Docker build-push action
is pinned to version v4, which is outdated. Update the action version from
docker/build-push-action@v4 to docker/build-push-action@v6 to leverage the
latest performance and feature improvements.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (6)
.github/workflows/base.yml (6)
109-109: Duplicate: Invalid runner label
Same issue as above—runs-on: ubuntu-latest-mis not a known GitHub-hosted label. Please address this in thebuild-base-uvjob as well.🧰 Tools
🪛 actionlint (1.7.7)
109-109: label "ubuntu-latest-m" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
150-150: Duplicate: Undefinedaxolotl_extrasin UV job.
The same undefinedmatrix.axolotl_extrasappears in the UV job’s tag expression. Please remove or default it here as well.🧰 Tools
🪛 actionlint (1.7.7)
150-150: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
93-93: 🛠️ Refactor suggestionUpgrade
docker/build-push-actionto v6 for performance.
The workflow pinsdocker/build-push-action@v4, missing key feature and performance improvements. Update to a recent v6 release (e.g.,docker/build-push-action@v6.15.0).- - name: Build - uses: docker/build-push-action@v4 + - name: Build + uses: docker/build-push-action@v6.15.0🧰 Tools
🪛 actionlint (1.7.7)
93-93: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
145-145: 🛠️ Refactor suggestionUpgrade
docker/build-push-actionin UV job to v6.
Align the UV job with the base job by usingdocker/build-push-action@v6.15.0instead ofv4.- - name: Build - uses: docker/build-push-action@v4 + - name: Build + uses: docker/build-push-action@v6.15.0🧰 Tools
🪛 actionlint (1.7.7)
145-145: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
138-138: 🛠️ Refactor suggestionUpgrade
docker/login-actionin UV job to v3.
Mirror the main job’s improvement: bump the login action here todocker/login-action@v3.4.0for consistency and runner compatibility.- - name: Login to Docker Hub - uses: docker/login-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v3.4.0🧰 Tools
🪛 actionlint (1.7.7)
138-138: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
86-86: 🛠️ Refactor suggestionUpgrade
docker/login-actionto v3 for stability.
You’re usingdocker/login-action@v2, which is outdated on newer runners. Bump to the latest v3 (e.g.,docker/login-action@v3.4.0) for improved compatibility and security.- - name: Login to Docker Hub - uses: docker/login-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v3.4.0🧰 Tools
🪛 actionlint (1.7.7)
86-86: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/base.yml(4 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/base.yml
20-20: label "ubuntu-latest-m" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
86-86: the runner of "docker/login-action@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
93-93: the runner of "docker/build-push-action@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
109-109: label "ubuntu-latest-m" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: PyTest from Source Dist (3.11, 2.7.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.6.0)
- GitHub Check: PyTest from Source Dist (3.11, 2.5.1)
- GitHub Check: PyTest (3.11, 2.5.1)
- GitHub Check: PyTest (3.11, 2.6.0)
- GitHub Check: PyTest (3.11, 2.7.0)
🔇 Additional comments (5)
.github/workflows/base.yml (5)
31-66: Matrix‐driven Dockerfile selection improves clarity.
Introducing adockerfileattribute on each matrix entry and referencing it directly in thebuildstep (file: ./docker/${{ matrix.dockerfile }}) consolidates Dockerfile logic and removes complex conditionals.
96-97: Use matrix‐driven Dockerfile reference in build step.
Referencingmatrix.dockerfiledirectly (file: ./docker/${{ matrix.dockerfile }}) simplifies the build configuration and aligns with your matrix entries.
107-113: Introducebuild-base-uvjob for UV support.
Adding thebuild-base-uvjob with its own matrix andDockerfile-uv-basecovers the new UV‐enabled base image path, aligning with the PR’s goal to support UV in CI.🧰 Tools
🪛 actionlint (1.7.7)
109-109: label "ubuntu-latest-m" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
120-127: Use matrix‐driven Dockerfile for UV job.
The UV job’s matrix entries includedockerfile: "Dockerfile-uv-base", which the build step consumes directly. This is consistent and clear.
148-149: Use matrix‐driven Dockerfile reference in UV build.
The UV build step referencesmatrix.dockerfilefor thefilepath, keeping it in sync with the matrix.
| context: . | ||
| file: ./docker/${{ matrix.dockerfile }} | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: ${{ steps.metadata.outputs.tags }}-base-py${{ matrix.python_version }}-cu${{ matrix.cuda }}-${{ matrix.pytorch }}${{ matrix.axolotl_extras != '' && '-' || '' }}${{ matrix.axolotl_extras }} |
There was a problem hiding this comment.
Undefined matrix property axolotl_extras.
The tags expression references matrix.axolotl_extras, but this key isn’t defined in the matrix. This will break the workflow. Either remove this suffix or explicitly add an empty default axolotl_extras: "" to every entry.
🧰 Tools
🪛 actionlint (1.7.7)
98-98: property "axolotl_extras" is not defined in object type {cuda: number; cuda_version: string; cudnn_version: string; dockerfile: string; python_version: number; pytorch: string; torch_cuda_arch_list: string}
(expression)
🤖 Prompt for AI Agents
In .github/workflows/base.yml at line 98, the tags expression uses the matrix
property axolotl_extras which is not defined in the matrix configuration. To fix
this, either remove all references to matrix.axolotl_extras from the tags
expression or add axolotl_extras: "" as a default key with an empty string value
to every matrix entry to ensure it is always defined.
| if: github.repository_owner == 'axolotl-ai-cloud' | ||
| # this job needs to be run on self-hosted GPU runners... | ||
| runs-on: axolotl-gpu-runner | ||
| runs-on: ubuntu-latest-m |
There was a problem hiding this comment.
Invalid runner label: ubuntu-latest-m.
The label ubuntu-latest-m is not a standard GitHub-hosted runner. If you intended to target a self-hosted GPU runner, consider using runs-on: [self-hosted, gpu] or configure this custom label in your actionlint.yaml so actionlint recognizes it.
🧰 Tools
🪛 actionlint (1.7.7)
20-20: label "ubuntu-latest-m" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
🤖 Prompt for AI Agents
In .github/workflows/base.yml at line 20, the runner label `ubuntu-latest-m` is
invalid as it is not a standard GitHub-hosted runner. Replace `runs-on:
ubuntu-latest-m` with either a valid GitHub runner label like `ubuntu-latest`
or, if targeting a self-hosted GPU runner, use `runs-on: [self-hosted, gpu]`.
Alternatively, configure this custom label in your actionlint.yaml to avoid
linting errors.
We don't officially have a way to reproducibly support uv yet. Should be simple, but having a docker base image to test against will go a long way in making sure we have stable builds when using uv.
Summary by CodeRabbit
New Features
uvtool, including instructions for creating virtual environments and installing dependencies.Chores