What would you like changed/added and why?
Hi
I needed to run mriqc on a cluster that does not allow an internet connection (OSLO university TSD)
However, the mriqc documentation does not provide any info (at least as far I could see) on how to do this or where to find relevant information.
The latter I found on: https://www.nipreps.org/apps/singularity/#templateflow-and-singularity
Maybe the documentation could have a subsection under "Running mriqc on HPC clusters", e.g., "running mriqc in singularity on clusters without or restricted internet connection," and link to https://www.nipreps.org/apps/singularity/#templateflow-and-singularity
In my case, the following steps did the trick:
- get the templateflow data on a local cluster/computer
In terminal run:
export TEMPLATEFLOW_HOME=/path/to/keep/templateflow
python -m pip install -U templateflow # Install the client
python
import templateflow.api
templateflow.api.TF_S3_ROOT = 'http://templateflow.s3.amazonaws.com'
templateflow.api.get(‘MNI152NLin2009cAsym’)
- create a tarfile
cd /path/to/keep
tar -cvf templateflow.tar templateflow/*
-
transfer tarfile to the remote cluster
-
untar tarfile
mkdir -p $HOME/.cache/
cp tarfile $HOME/.cache
tar xvf templateflow.tar
- Example singularity setup.
export SINGULARITYENV_TEMPLATEFLOW_HOME=/templateflow
singularity run --cleanenv --contain
-B ${TEMPLATEFLOW_HOME:-$HOME/.cache/templateflow}:/templateflow
-B ${BIDS_DIR_TMP}/:/data_in
-B ${SCRIPTS_DIR}/:${SCRIPTS_DIR}
-B ${DERIV_DIR}/:/data_out
-B ${WORK_DIR}/:/work
-B /tmp:/tmp
${mriqc_sif}
/data_in
/data_out
participant
-w /work
--participant-label ${sub}
--mem_gb ${mem}
--float32
--nprocs ${SLURM_CPUS_PER_TASK}
--ants-nthreads ${SLURM_CPUS_PER_TASK}
--verbose-reports
--no-sub
-vv
Do you have any interest in helping improve the documentation?
No
Do you have any suggestions for the new documents?
Maybe add a subsection under "Running mriqc on HPC clusters", e.g., "running mriqc in singularity on clusters without or restricted internet connection," and link to https://www.nipreps.org/apps/singularity/#templateflow-and-singularity