Skip to content

feat: squashing environments into archives #4412

@MilesCranmer

Description

@MilesCranmer

Problem description

So, I am using pixi on an institutional filesystem that places strict limits on the number of files. It limits files to 1M in total, which gets quickly overran, since I have a different env for every global tool install. To deal with this, I usually take an overkill approach and put my entire .pixi folder into a .tar archive, and unpack it onto /dev/shm whenever I'm working.

But this is inconvenient and constraining, so I've been looking into other approaches. I was wondering if there is any way I can automatically mount and unmount a SquashFS per environment, triggered upon activation?

For example, I could do:

mksquashfs ~/.pixi/envs/vllm ~/.pixi/envs/vllm.sqsh -comp zstd -Xcompression-level 0 -noappend

And then mounting this onto my /dev/shm and symlink it.

But I'm not sure if this is the cleanest approach. It also seems a bit fragile.

Is there a better way I can do this? Perhaps there is some sort of built-in way to squash environments at deactivation?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions