Skip to content

ci: free up disk space before ROCm container build#460

Merged
mostlygeek merged 1 commit intomainfrom
claude/fix-rocm-build-space-bKBWs
Jan 15, 2026
Merged

ci: free up disk space before ROCm container build#460
mostlygeek merged 1 commit intomainfrom
claude/fix-rocm-build-space-bKBWs

Conversation

@mostlygeek
Copy link
Copy Markdown
Owner

@mostlygeek mostlygeek commented Jan 15, 2026

Add disk cleanup step to clear space before building the ROCm container
to prevent out-of-disk-space errors during the build process.

  • Remove .NET framework files (~20-30GB)
  • Remove Android SDK (~10-15GB)
  • Remove GHC tooling (~5-10GB)
  • Remove CodeQL tools (~5-10GB)
  • Prune Docker system to remove unused images

This cleanup runs only for the rocm platform build to minimize impact
on other builds.

fixes mostlygeek/llama-swap/actions/runs/21021128343

Summary by CodeRabbit

  • Chores
    • Optimized CI/CD pipeline disk management for improved build efficiency on specific platforms.

✏️ Tip: You can customize this high-level summary in your review settings.

Add disk cleanup step to clear space before building the ROCm container
to prevent out-of-disk-space errors during the build process.

- Remove .NET framework files (~20-30GB)
- Remove Android SDK (~10-15GB)
- Remove GHC tooling (~5-10GB)
- Remove CodeQL tools (~5-10GB)
- Prune Docker system to remove unused images

This cleanup runs only for the rocm platform build to minimize impact
on other builds.

fixes mostlygeek/llama-swap/actions/runs/21021128343
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 15, 2026

Walkthrough

Adds a conditional GitHub Actions workflow step that runs disk cleanup when building ROCm containers. The step prints disk usage, removes large tool directories, prunes Docker images, and precedes the container registry login step.

Changes

Cohort / File(s) Summary
GitHub Actions workflow modification
.github/workflows/containers.yml
Adds a "Free up disk space" step that conditionally executes when matrix.platform == 'rocm'. The step prints pre/post-cleanup disk usage, removes tool directories (Android SDK, .NET, Java, and Haskell tools), and executes docker system prune -af before proceeding to container registry authentication.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a disk cleanup step specifically for ROCm container builds in the CI workflow.
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.



📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66d555e and ac0274b.

📒 Files selected for processing (1)
  • .github/workflows/containers.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: run-tests
  • GitHub Check: run-tests
  • GitHub Check: build-and-push (rocm)
🔇 Additional comments (1)
.github/workflows/containers.yml (1)

30-41: LGTM! Well-structured disk cleanup step.

This is a well-known pattern for freeing disk space on GitHub Actions runners. The conditional targeting only rocm is appropriate since ROCm containers are notoriously large. The df -h before/after provides good visibility into the cleanup effectiveness.

Minor note: rm -rf is safe on non-existent paths (won't fail), so the step should be robust even if GitHub changes runner directory layouts in the future.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@mostlygeek mostlygeek merged commit 3edb180 into main Jan 15, 2026
10 checks passed
@mostlygeek mostlygeek deleted the claude/fix-rocm-build-space-bKBWs branch January 15, 2026 06:03
rohitpaul pushed a commit to rohitpaul/llama-swap that referenced this pull request Mar 29, 2026
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