-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable uv cache when creating container image #5646
Conversation
We don't intent to run uv again, so the cache is not really useful. The cache directory size is around 80MB, however, the files are mostly hardlinks to the original files in `/usr/local/lib/python3.13/site-packages` so the actual saving is much smaller.
📝 WalkthroughWalkthroughThe Dockerfile has been updated to adjust the installation process for Python packages. The changes replace direct calls to Changes
Sequence Diagram(s)Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
Dockerfile (1)
36-41
: Conditional Command Prefix & Disabled Caching for Requirements Installation.The conditional block sets the
setarch
variable based on the build architecture (using"linux32"
fori386
and an empty string otherwise) and then prefixes theuv pip install
command with that variable. The updated installation command also correctly includes the--no-cache
flag (as well as other options), which aligns with the objective of disabling the uv cache during the container image build.One minor suggestion is to quote the variable substitution (i.e., use
"$setarch"
instead of${setarch}
) to ensure clarity and to follow best practices in shell scripting, although the current implementation should work as intended.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: Build armv7 supervisor
- GitHub Check: Run tests Python 3.13.2
- GitHub Check: Build armhf supervisor
- GitHub Check: Build aarch64 supervisor
🔇 Additional comments (1)
Dockerfile (1)
47-48
: Disabled Cache for Home Assistant Supervisor Installation.The updated
uv pip install
command for the Home Assistant Supervisor now includes the--no-cache
option. This change is consistent with the PR objective to disable uv caching during image creation and helps reduce the unnecessary disk usage. The subsequent compilation command is also appropriately placed in the same RUN block.
Proposed change
We don't intent to run uv again, so the cache is not really useful. The cache directory size is around 80MB, however, the files are mostly hardlinks to the original files in
/usr/local/lib/python3.13/site-packages
so the actual saving is much smaller.Type of change
Additional information
Checklist
ruff format supervisor tests
)If API endpoints or add-on configuration are added/changed:
Summary by CodeRabbit