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

Enable the use of containers when --use-conda is not defined #381

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

akhanf
Copy link
Member

@akhanf akhanf commented Feb 25, 2025

The issue was that whenever any rule has both a conda and container directive defined, then it checks the version of conda in the container, since the behaviour will be to use the container to build the conda env.

But for us, we just want the container to be used without conda at all, so this adds a wrapper when defining conda environments, so that it is set to None if the --use-conda flag is not set.

Looks to be working fine in dry-run, will do a full test now..

replaces all conda envs with None if --use-conda is not set, so that it
doesn't try to build the conda env using the container, and instead just
simply use the container for execution.
@akhanf akhanf changed the base branch from master to dev-v2.0.0 February 25, 2025 14:18
@akhanf
Copy link
Member Author

akhanf commented Feb 25, 2025

Note: this currently only works for snakemake>=8.0 (so python >= 3.11), should be able to fix this, just need to find out what variable the deployment mode is defined in for snakemake < 8.0

@akhanf
Copy link
Member Author

akhanf commented Feb 25, 2025

actually there are also a couple container edits that were needed too, just testing those out, but if those work, make sure you use an updated container (e.g. delete your old one)..

@akhanf
Copy link
Member Author

akhanf commented Feb 25, 2025

ok this should be good to go now, tested with updated hippunfold-deps container, and added fix that works for older and newer snakemake versions

@akhanf akhanf requested a review from Dhananjhay February 25, 2025 19:48
@akhanf akhanf merged commit 7dd0d46 into dev-v2.0.0 Feb 25, 2025
6 checks passed
@akhanf akhanf deleted the container-noconda branch February 25, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant