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

mamba is difficult to install in grenepipe environment #40

Closed
wangshuangyi opened this issue Jan 24, 2024 · 5 comments
Closed

mamba is difficult to install in grenepipe environment #40

wangshuangyi opened this issue Jan 24, 2024 · 5 comments

Comments

@wangshuangyi
Copy link

wangshuangyi commented Jan 24, 2024

(grenepipe) [sysu_mhwang_1@sy3ubuntu1804-23101937-698d4864d-99fwt envs]$conda install mamba
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): /
Software installation would be too slow without mamba.I noticed that the yaml files in the envs folder don't have names, can I write a name for each yaml file and then install each virtual environment separately in the mamba environment

@lczech
Copy link
Member

lczech commented Jan 24, 2024

Hey @wangshuangyi,

it seems that you first created the grenepipe environment with conda, and are now installing mamba from within that environment? That indeed could be slow - it's faster to install mamba first, just as a normal step in conda withing any grenepipe, and then create the grenepipe environment from there, as documented here. That should work faster.

As for naming the environments: That is not something that snakemake uses. If you create all the individual tool environments manually, snakemake won't know about it, and won't use them, so that would not help you. Instead, get mamba to work as documented, install and activate the grenepipe environment from there, and let snakemake take care of the rest ;-)

Hope that helps, so long
Lucas

@wangshuangyi
Copy link
Author

Thank you very much for your reply. I have solved the problem of mamba, but as shown below, this command is often interrupted due to my network environment, may I ask whether I can re-run this command after the interruption? Also, I notice that when I run snakemake --use-conda --conda-frontend mamba --cores 4 --directory example/, each yaml will generate a different file after completion under path/grenepipe-0.12.2/example/.snakemake/conda/. If I execute a different project, do I need to run $snakemake --use-conda --conda-frontend mamba --cores 4 --directory xxx/?

@lczech
Copy link
Member

lczech commented Jan 24, 2024

Hi @wangshuangyi,

Thank you very much for your reply. I have solved the problem of mamba,

Very good!

but as shown below, this command is often interrupted due to my network environment, may I ask whether I can re-run this command after the interruption?

That is a more general conda/mamba question. If any install step fails, you might need to delete the env first again before re-trying (conda env remove --name env_name), but I'd talk with your network administrator to fix your network instead.

Also, I notice that when I run snakemake --use-conda --conda-frontend mamba --cores 4 --directory example/, each yaml will generate a different file after completion under path/grenepipe-0.12.2/example/.snakemake/conda/.

Yes, for some reason, snakemake always installs the environments locally in the directory where you run your analysis (the one specified via --directory). This is of course time- and space-consuming and unnecessary, and so you can use this trick to instead re-use the environments once you have them installed.

If I execute a different project, do I need to run $snakemake --use-conda --conda-frontend mamba --cores 4 --directory xxx/?

Yes, see here and here.

I'd recommend to read the whole wiki. That might answer most of your questions. If not, let me know.

Cheers
Lucas

@lczech
Copy link
Member

lczech commented Mar 12, 2024

Dear @wangshuangyi,

any update on this, or can be close the issue?

Cheers
Lucas

@lczech
Copy link
Member

lczech commented May 23, 2024

Closing the issue now, but feel free to re-open if this is still and issue.

@lczech lczech closed this as completed May 23, 2024
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

No branches or pull requests

2 participants