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

Run MPRAsnakeflow without internet #164

Open
biozzq opened this issue Jan 15, 2025 · 3 comments
Open

Run MPRAsnakeflow without internet #164

biozzq opened this issue Jan 15, 2025 · 3 comments
Assignees

Comments

@biozzq
Copy link

biozzq commented Jan 15, 2025

Dear all,

My server cannot connect to the internet, and only the administrator has permission to help install tools that require an internet connection. If I want to install MPRAsnakeflow locally through the administrator, is there any relevant documentation or instructions available?
Thank you very much.

Best wishes,

Zheng zhuqing

@visze
Copy link
Collaborator

visze commented Jan 15, 2025

Hi Zheng zhuqing,

Yes, I think it is possible. The solution I write here requires snakemake on your system. Right now theer exists no all-in-one container. But this will be available at some point (I guess mid of this year).

SOLUTION: The most problematic part is to install the conda envs which is not possible without internet access. But there is the option using the pre-build docker container of all environments using apptainer. The most difficult part is to safe the container at the right position on the system using the corrected (hashed) filename snakemake needs.

You can use this few lines of code to download the image using te correct name on a system with internet access (use the version that you want to use):

VERSION="0.4.2";
URL="docker://visze/mprasnakeflow:${VERSION}";
IMAGE_NAME=`echo -n "${URL}" | md5sum | awk '{print $1".simg"}'`
singularity pull --name $IMAGE_NAME $URL

Then you have to copy it to your system, e.g. /your/container/directory/. There you snakemake MPRAsnakeflow command including this:

--sdm apptainer conda --apptainer-prefix /your/container/directory/

E.g. something like

snakemake --sdm apptainer conda --apptainer-prefix /your/container/directory/ --configfile config.yml --snakefile MPRAsnakeflow/workflow/Snakefile --directory /your/working/directory --cores 10

If you are able to run it with this approach I will update the documentation accordingly. Cross fingers that it works!

@biozzq
Copy link
Author

biozzq commented Feb 5, 2025

Dear @visze

I apologize for not being able to test sooner. Over the past couple of days, I have followed your suggestions for testing, but I encountered the following error. I wanted to check if you have faced any similar issues. Thank you for your assistance.

snakemake --sdm apptainer conda --apptainer-prefix ~/zhengzhuqing/tmp/2024-8-01/demo --configfile config.yml --snakefile ~/zhengzhuqing/tmp/2024-8-01/demo/MPRAsnakeflow-0.4.4/workflow/Snakefile --directory ./ --cores 10

Running MPRAsnakeflow version 0.4.4
Assuming unrestricted shared filesystem usage.
host: admin2
Building DAG of jobs...
ERROR  : Failed to create user namespace: user namespace disabled
WorkflowError:
Error running conda info. Is conda installed and accessible? Error: Command ' singularity --quiet --silent exec --cleanenv --home '/public2/users/zhengzhuqing/tmp/2024-8-01/demo/MPRAsnakeflow_tutorial/data/assoc_basic'  /public/home/zhengzhuqing/zhengzhuqing/tmp/2024-8-01/demo/10c653d5f352eebc42776adcb0d6a32c.simg sh -c 'conda info --json'' returned non-zero exit status 1.

Best regards
Zheng zhuqing

@visze
Copy link
Collaborator

visze commented Feb 6, 2025

Mhh.. I think I saw this error before. Maybe when I run the command using --sdm apptainer without conda. So not sure what exactly causes the issues. But aybe coda is needed on the host system? I thought is uses the conda within the container but maybe I am mistaken.

@delangeni Can you test this locally on your end and see if you can get the same error?

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

3 participants