chapmanb / cloudbiolinux

CloudBioLinux: configure virtual (or real) machines with tools for biological analyses
http://cloudbiolinux.org
MIT License
257 stars 158 forks source link

Problems with centralized conda installation #324

Closed karl616 closed 4 years ago

karl616 commented 4 years ago

I have a problem with this section:

https://github.com/chapmanb/cloudbiolinux/blob/3d60fde49ebcfdc6d8dac37a44573de06e64433d/cloudbio/package/conda.py#L208-L237

The background is that I wanted to install bcbio-nextgen through conda. What I do is:

conda create -p bcbio bcbio-nextgen
conda activate bcbio

bcbio expects conda in the same folder as the bcbio executables. I have a central conda installation and soft-linked it to the bcbio binary folder. Secondly, I don't have write permissions to the central environment folder. This goes wrong when bcbio/cloudbiolinux tries to verify that it has installed the environments.

_create_environments(..) will install into the first write-able folder from .condarc["envs_dir"], while _get_conda_envs(..) only accepts those installed alongside the main installation of conda. In my case these are two different locations.

Is this intentional? And if so, why must it be so strict?

karl616 commented 4 years ago

Looking at this a bit more, it looks like one idea is to enforce that the environments lives in the bcbio folder. I think that is a good idea.

Couldn't the same thing be achieved by creating environments with the --path flag rather than --name. That way their locations could be controlled without relying on the conda location.

On the other hand, this have implications on the rest of the code and how environments are loaded.

roryk commented 4 years ago

Hi @karl616,

Thanks-- closing this so we can chat on the bcbio repo. The bioconda package just installs the code and not any of the tools, so you'll need to use the installer to get bcbio installed.