Can a Pixi project environment inherit from the a global environment? #3394
Six6stRINgs
started this conversation in
General
Replies: 1 comment
-
It's a great idea, though I would probably not to use it since inheritance generally brings redundant unexpected behaviour. Disk space is usually cheaper than your time to avoid potential conflict and unexpected behaviour. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, thanks for your great work of pixi. I'm a Miniconda user who's recently become interested in Pixi and am exploring its capabilities.
And, I'm a student study the deep learning. Many project were run on my own computer, so I may care for the project disk space it is using.
I have a question about environment management that stems from my experience with Conda.
With Miniconda, I often faced a dilemma:
torch cuda
consumes too much disk space!)Pixi emphasizes project-center environments with fast speed. So, my question is: Is it possible in Pixi to create a new project environment that inherits from an existing, global Pixi environment?
This is very similar to Make virtualenv inherit specific packages from your global site-packages.
Here is a situation:
Project
A
andB
both needpython interpreter
andtorch cuda
with the same version and necessary dependencies. ButA
needspytorch_lighting
to build the whole project whileB
needsPyQt5
to create an UI. I want to create a global env namedtorch-base
contains basic env oftorch
and have each project env share the base packages from thetorch-base
environment. The project env will only need to install the additional packages and dependencies(pytorch_lighting
andPyQt5
in this case). In this circumstances, I can save the disk space and also create some neat environments.The
torch-base
is frozen, so while I can add a new package in the project env, it would only install to the project path unless I run some global install cmd.Plus, It is possible to creat a tree-structured inheritance relationship? Like: global env
Ea
is a basic torch env (root of the tree), global envEb
is inherited fromEa
with additional package liketransformers
.Eb
can be inherited to other project env(leaf of the tree) which will mainly foucs on NLP. On the other hand, global envEc
is inherited fromEa
with some packages likePyQt5
, so project needs UI can inherit from it. Every package as well as its dependencies use disk only one time.I'm not certain my idea is completely thought out, but I'm very curious about it!
Thanks in advance for any insights or guidance you provide!
Beta Was this translation helpful? Give feedback.
All reactions