ENHANCE-PET / MOOSE

MOOSE (Multi-organ objective segmentation) a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research.The pipeline is based on nn-UNet and has the capability to segment 120 unique tissue classes from a whole-body 18F-FDG PET/CT image.
https://enhance.pet
GNU General Public License v3.0
196 stars 28 forks source link

Manage MOOSE env vars #45

Closed chris-clem closed 1 year ago

chris-clem commented 2 years ago

Dear MOOSE team,

I mentioned the following issue in another issue and wanted to create a new one for it:

I don't know if adding the env variables to `.bashrc` is the best place to do it. Some users might use zsh and others might use nnUnet seperately.  

Originally posted by @chris-clem in https://github.com/QIMP-Team/MOOSE/issues/42#issuecomment-1286930959.

As a quick solution, I added a env_vars.sh file in the MOOSE repo dir that I source instead of .bashrc. In the meantime, I have searched how people are handling the problem in general and found the following possibilities:

  1. Create a .env file in the repo dir and load it with python-dotenv as explained here.
  2. Create a .env file in the repo dir and recommend users to use direnv, which then automatically loads the env variables when changing in the MOOSE dir.
  3. Recommend users to create a MOOSE conda environment and enable loading and unloading the env vars when activating/ deactivating the conda environment as described here.

The downside of 1. is that it requires a new dependency, the downside of 2. that it requires a new program, and the downside of 3. is that it requires conda for managing the environment.

What do you think is the best option?

LalithShiyam commented 2 years ago

Hi @chris-clem, I am down with Covid and the other MOOSE members are on vacay. Many thanks for the detailed analysis.I will be able to look at it in detail next week. Sorry about the delay!

chris-clem commented 2 years ago

No problem, I hope you recover soon!

chris-clem commented 2 years ago

Did you get a chance to take a look?

LalithShiyam commented 2 years ago

@chris-clem I did, I like option 2...

chris-clem commented 2 years ago

Got it, thanks! I try to create a PR next week.

LalithShiyam commented 1 year ago

MOOSE v2.0 doesn't have any of these issues @chris-clem! Also a friend showed me your prezi from Fully-3D conference. Now you can actually integrate your models easily in MOOSEV2. Have a look at the readme!