Make even more use of the package cache #1354
ruben-arts
started this conversation in
Ideas
Replies: 1 comment
-
I found that For example:
With allowing a user to set these through CLI or |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Statement
Pixi solves one extremely important issue: it doesn't break other projects when installing the requirements for one project.
Problem
TL;DR: The disk usage grows rapidly if the packages don't share the exact same versions, thus not making use of the cache
Just getting my Raspberry Pi in noticed that with low storage capabilities, running multiple projects can become a disk filling process. This has some what to do with having multiple versions of similar packages on a machine.
Using the below mentioned script I found that some of the more important libraries on my (1TB) dev-system have multiple duplicates. This is exactly what I want to ensure my projects keep working but it's not the best experience on my
32GB
RPI.Simple Python script to find package duplicates
Run this script in the
~/.cache/rattler/cache/pkgs
dir to find the conda package duplicatesIdea
What if we could tell the solver, with an extra option, which packages we already have locally and it should pick from this set if it can "comfortably" (what ever that means). This in contrast with the "get latest version" logic that it uses right now.
This is particularly useful for
pixi global install
as there you don't care about a previously locked set but you just want to quickly install packages, most-likely growing the disk usage as little as possible.For projects we could allow the same logic, but with like a request if you set a certain config variable.
Simple example would be
python
, if a project supports>=3.8, <3.12
you don't need to download3.11
if you already have3.10
.Alternatives
pixi clean cache --unused
. This would limit the ever growing cache issue.Acknowledgement
This potentially creates a strange experience when you simply want the latest version of everything, but misunderstood the configuration options.
For projects, this might reintroduce reproducibility issues, that we avoid with the "locked" approach. That is why this should always be a strong opt-in and interactive feature in my opinion.
Beta Was this translation helpful? Give feedback.
All reactions