Closed ManavalanG closed 1 year ago
All dependencies can be identified from the existing conda environment. Here I used conda envs created by snakemake (for quac) with this script:
#!/usr/bin/env bash
set -euo pipefail
ml reset
ml Anaconda3
OUT_DIR="data/test"
mkdir -p $OUT_DIR
SNAKEMAKE_CONDA_DIRPATH="/path/to/quac/1.0/.snakemake/conda"
for conda_env in $(ls -d ${SNAKEMAKE_CONDA_DIRPATH}/*/)
do
echo $conda_env
env_dirpath=$(dirname $conda_env)
env_name=$(basename $conda_env)
echo $env_name
cp ${env_dirpath}/${env_name}.yaml ${OUT_DIR}/${env_name}.yaml
set +eu # see https://github.com/conda/conda/issues/8186#issuecomment-532874667
conda activate ${env_dirpath}/${env_name}
set -eu # https://github.com/conda/conda/issues/8186#issuecomment-532874667
conda env export > ${OUT_DIR}/${env_name}_exported.yaml
sleep 5
done
mentioned in commit 6ddf6d9b85f6a289c1bbd94bed5bf1d564393755
mentioned in commit 544a7f6df319c386f4deaa8a145c6e9f5fe5f3f8
mentioned in commit 92db1d14c642751ceb4d935b3bd26a356b7eac9a
Conda environments are currently implicitly defined with just the most high-level dependencies mentioned. This has led to issues in the past:
I suspect this will be a bigger issue as time goes by and new version of implicit dependencies become available. So specifying the exact dependency is a good idea to work around this issue.