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 cudaconsumes 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
AandBboth needpython interpreterandtorch cudawith the same version and necessary dependencies. ButAneedspytorch_lightingto build the whole project whileBneedsPyQt5to create an UI. I want to create a global env namedtorch-basecontains basic env oftorchand have each project env share the base packages from thetorch-baseenvironment. The project env will only need to install the additional packages and dependencies(pytorch_lightingandPyQt5in this case). In this circumstances, I can save the disk space and also create some neat environments.The
torch-baseis 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
Eais a basic torch env (root of the tree), global envEbis inherited fromEawith additional package liketransformers.Ebcan be inherited to other project env(leaf of the tree) which will mainly foucs on NLP. On the other hand, global envEcis inherited fromEawith 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