varCA icon indicating copy to clipboard operation
varCA copied to clipboard

prepare.yml environment yields conflicts with strict channel_priority

Open aryarm opened this issue 3 years ago • 2 comments

If channel_priority is set to "strict" in one's .condarc, it becomes impossible to install the prepare.yml environment file. conda will just spit out a bunch of conflicts. Ideally, all of our environment files would work with strict channel-priority mode, since conda is set to make that the default in v5.0 (source).

We have two options.

  1. make the prepare.yml environment file work with strict channel priority configurations
  2. break up the prepare.yml environment file into separate environment files: one for each variant caller

Option 2 is probably better in the long-run. But option 1 might be more feasible, since I'm not sure how I would achieve option 2 (see #19).

aryarm avatar Jun 26 '21 18:06 aryarm

Unfortunately, I've spent all morning trying option 1 with no success. For whatever reason, strict channel priority yields conflicts no matter how much information is specified in the environment file. For example, try this:

  1. Set channel_priority to "disabled" in ~/.condarc
  2. Install the prepare.yml conda environment and then activate it
  3. Set channel_priority to "strict" in ~/.condarc
  4. Create an environment file containing all of the packages in that conda environment, including the exact channels, version numbers, and build numbers.
    {
        echo -e "channels:\n  - nodefaults\ndependencies:";
        conda list | tail -n+4 | awk -v OFS="" '{print $4, "::", $1, "=", $2, "=", $3;}' | sed 's/^/  - /';
    } > environment.yml
    
  5. Try to install that new environment file

This leads to conflicts. But when I rerun step 5 with channel_priority set to disabled, it works! 😠😖😕

Either there is a bug in conda or I have misunderstood how strict channel priority is supposed to work.

aryarm avatar Jun 26 '21 19:06 aryarm

Marking as a duplicate because this issue will be solved by #19

aryarm avatar Jul 01 '21 16:07 aryarm