Skip to content

Commit

Permalink
fixing containerize use of conda envs to handle class
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Nov 4, 2021
1 parent 2f3b092 commit 0a2c32d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions snakemake/deployment/containerize.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ def relfile(env):
else:
return env.file.get_path_or_uri()

envs = sorted(
set(
conda.Env(rule.conda_env, workflow, env_dir=CONDA_ENV_PATH)
for rule in workflow.rules
if rule.conda_env is not None
),
key=relfile,
)
envs = []
for rule in workflow.rules:
if rule.conda_env is not None:
new_env = conda.Env(rule.conda_env, workflow, env_dir=CONDA_ENV_PATH)
if new_env not in envs:
envs.append(new_env)
envs = sorted(envs, key=relfile)

envhash = hashlib.sha256()
for env in envs:
logger.info("Hashing conda environment {}.".format(relfile(env)))
Expand Down

0 comments on commit 0a2c32d

Please sign in to comment.