Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert conda environment handling #114

Closed
ewels opened this issue Aug 9, 2018 · 4 comments
Closed

Revert conda environment handling #114

ewels opened this issue Aug 9, 2018 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ewels
Copy link
Member

ewels commented Aug 9, 2018

Previously, we created a conda environment with a specific name and then manually added this directory to the PATH. This worked fine, but felt a little hacky. After some discussion (@apeltzer @sven1103 @ewels @pditommaso and others), we removed it. Instead, we now install the environment to the base conda environment.

This all seemed fine, until we just came across a strange bug. After some investigation, it seems that the host filesystem conda installation was taking priority over the base conda environment (due to configuration files in the home directory). Combined with conflicting path mounts we ended up with a steaming mess and non-functional software. This issue creates two problems:

  • Software breaks (as above)
  • Software works, but is actually the host installation and not from the container (not reproducible)

Either we need a fix, or we can revert to the previous method. Manually prepending to the PATH env skips all of these problems, as we're essentially not using conda any more.

@ewels ewels added the bug Something isn't working label Aug 9, 2018
@pditommaso
Copy link

pditommaso commented Aug 9, 2018

it seems that the host filesystem conda installation was taking priority over the base conda environment (due to configuration files in the home directory)

How config files (of what) in the home can affect the PATH ?

Installing the deps in a separate conda env and "activating" it by adding it by adding the env path to the PATH variable, may not be safe when the source activate command adds custom variables in the target environment.

@HadrienG HadrienG self-assigned this Aug 9, 2018
HadrienG added a commit to HadrienG/tools that referenced this issue Aug 9, 2018
ewels added a commit that referenced this issue Aug 10, 2018
reverse conda env handling (fix for #114)
@HadrienG
Copy link
Member

Closed with 7152f8d

@ewels
Copy link
Member Author

ewels commented Aug 10, 2018

Sorry @pditommaso - inbox is overflowing and only just saw your comment..

How config files (of what) in the home can affect the PATH ?

The conda config file: ~/.condarc was showing up when we ran conda info inside the singularity image (singularity shell pipeline.simg). This was adding the paths for the local conda environments and somehow the local environments were being activated instead of using the root conda env. Not sure if it was the .condarc file that was doing this activation or something else..?

..may not be safe when the source activate command adds custom variables in the target environment.

When would source activate add custom variables? As we have complete control of the environment.yml in the pipeline, we should be able to ensure that this isn't a problem right? I'm still inclined to revert as the previous method has been working well across a range of systems, and we've had problems as soon as we switch to the root conda env.

@pditommaso
Copy link

pditommaso commented Aug 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants