Description
Problem description
Hello Pixi devs,
Conda constructor
I use Conda constructor for creating installations that can then be used on air gapped machines (no internet).
A very simple overview of how constructor works is as follows
- Create a conda environment(multiple envs are also supported) based on the dependencies specified (
environment.yml
or directly in theconstruct.yml
) - Create installers for each OS specified (e.g linux, win, osx )
- In addition the installers also support pre post install scripts/hooks and also allow setting environment variables
- All of this data is packaged into an installer per platform which can then be run to recreated the conda installation on the target
These installations can then be used to create an offiline installation on any machine. The installation is a conda installer (customized since it has all the dependencies also packaged as part of the installation) that can then be installed using the same cli used to install miniconda.
Enhancement proposal for pixi
Suggestion/Enhancement here would be that pixi also support such a similar mechanism. From what i have looked all/most of the necessary plumbing is already there.
A rough idea of how this might work is as follows
- Use pixi.toml to specify the dependencies and tasks
pixi construct
creates a.pixi
folder with all the dependencies per environment stored- an installation script similar to what pixi currently has is generated per platform with the difference being that running this will install pixi and also the envs created in the previous step
- All this data is available as an installer/zip file
- The installer should also run the pre/post install hooks.
There is also another tool from conda called conda pack but this doesn't offer the same flexiblity/robustness as conda constructor since conda pack more or less creates an archive out of the existing env to make it portable and doesn't offer any way of customizing. In addition conda pack is not under active development.
Thanks!