idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.79k stars 1.05k forks source link

Append INL conda channel in the environment rc instead of system rc #28970

Open hugary1995 opened 1 month ago

hugary1995 commented 1 month ago

Motivation

This installation guide instructs users to add the INL channel to system rc

conda config --add channels https://conda.software.inl.gov/public

While this works, it affects users' existing envs.

Design

Change it to

conda config --env --add channels https://conda.software.inl.gov/public

or

conda config append --env channels https://conda.software.inl.gov/public

But note that this has to happen after the user activates the moose environment.

Impact

Slightly more professional.

milljm commented 1 month ago

We do this for our build machines to be "cleaner" as well.

I'll look into it. There is one package that is hard coded to only be installed into the base environment ncrc-client, which would require a user to have the public channel available at that time. But perhaps I can modify that.

In the end, more isolated environments is a good thing. And training our users how to do it as well.

milljm commented 1 month ago

Since we frown on conda update (because it fails routinely, and the fix is to delete the env, and recreate it), we only need the channel once. For the install process.

I suggest we change the instructions to:

conda create -n moose moose-dev mpich --channel https://conda.software.inl.gov/public
hugary1995 commented 1 month ago

well conda update has been successful for me recently... but I'm okay with your suggestion, though have we completely given up the idea of getting conda update to work robustly (even in the distant future)?

milljm commented 1 month ago

I suppose folks can simply append --channel https://conda.software.inl.gov/public if they wish to use update. We no longer supply instructions for using conda update. So those that do, I would consider Conda power users that know what they're doing.

Actually, power users will conda config --env --add channel ... anyways, and do what they please =D

This is all in the name of our normal end-users. I like your idea of not messing with a users ~/.condarc file. 💯 %

cticenhour commented 1 month ago

@hugary1995 conda update didn't work successfully for me recently after the addition of an OpenMPI version of the package, so I think we will always go through periods where the update will not work quite right. We semi-regularly have to pin something new due to a CI or library issue, additions of child packages, etc. We consistently learn new ways of setting up the packages to avoid this, but it always seems like it'll be a "forever" fight. 😄

I personally like using moose install moose-dev=xx.xx.xx in order to perform an update to the newest version, but to each their own.

cticenhour commented 1 month ago

I suggest we change the instructions to:

conda create -n moose moose-dev mpich --channel https://conda.software.inl.gov/public

@milljm I wouldn't mind us doing this in the instructions, if the goal is to limit alternations to a user's system configuration as @hugary1995 is requesting and boosting per-environment consistency. Pinging @loganharbour for his take too.

hugary1995 commented 1 month ago

Yeah, all are valid points! I'm convinced to not change the installation instruction. Doing that one-time channel thing also looks fine to me. It's up to you I guess. If you decide not to change the instructions, please feel free to close this issue.

milljm commented 1 month ago

@cticenhour made a great comment to me off site, about how if we do it this way, we effectively avoid messing with a users RC file all together. Which I like.

loganharbour commented 1 month ago

Fine with me.

milljm commented 1 month ago

Yeah, all are valid points! I'm convinced to not change the installation instruction. Doing that one-time channel thing also looks fine to me. It's up to you I guess. If you decide not to change the instructions, please feel free to close this issue.

No, I will be changing the instructions.

conda create -n moose moose-dev mpich --channel https://conda.software.inl.gov/public

is the direction I am heading. Just need to fix our NCRC client in the process.

milljm commented 3 weeks ago

While working under this new idea, I am experiencing a lot of extra things to type. I like our idea and @hugary1995 's idea of sticking it in the target env.

I'll create some sort of page that describes how to properly manage Conda environments. I know we tend to shy away supplying "HowTos" for other software. But I think for this, we need to allow the user to decide.