galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.37k stars 989 forks source link

Setting both conda_exec and conda_prefix overrides conda_prefix with conda_exec prefix. #11817

Open rhpvorderman opened 3 years ago

rhpvorderman commented 3 years ago

The debug output shows that conda uses the -n flag instead of the -p flag to create the environments. This will always create the environment at the location where conda is installed. It is not possible to have conda_prefix and conda_exec in a different prefix.

In theory it should be possible to do the following:

This allows having the galaxy conda prefixes independent and separate of the root conda prefix. This is advantageous in containers.

I tried to do this, but it is not possible unfortunately.

nsoranzo commented 3 years ago

@rhpvorderman It should be possible to do that by updating lib/galaxy/tool_util/deps/conda_util.py , let us know if you would like to take a stab at it.

rhpvorderman commented 3 years ago

Sure. No problem! I will put my container plans on hold until I fix this.

@nsoranzo I suppose there are no objections to backporting this back to the 21.01 branch?

nsoranzo commented 3 years ago

Sure. No problem! I will put my container plans on hold until I fix this.

Thanks!

I suppose there are no objections to backporting this back to the 21.01 branch?

Fine by me!

rhpvorderman commented 3 years ago

I did some work here: https://github.com/galaxyproject/galaxy/compare/dev...rhpvorderman:bug11817

But it turns out this does not install 'activate' and therefore the environments can not be activated the usual way. The environments are functional and the stuff in the bin folder works, but changing this also means changing the way galaxy commands are run (no activating, but simple path prepending should be done). So this is a less trivial issue than expected.