Commit ae4630c4 authored by Alex Waite's avatar Alex Waite

fmriprep: better FS license handling; use Juseless singularity library

parent 437c0010
......@@ -9,17 +9,10 @@ run for your project. Most importantly the
to control which workflows are run
## Prerequisites
* a FreeSurfer license file located at `~/freesurfer_license.txt` (you can
copy the system one using `cp /opt/freesurfer/6.0/license.txt
~/freesurfer_license.txt`. Hopefully this step can be removed soon.
* a Singularity image of fMRIPrep. You can build it by running:
```
singularity build ~/fmriprep-<version>.simg docker://poldracklab/fmriprep:<version>
```
Be sure to substitute `<version>` for the version of fMRIPrep you want to build.
* a BIDS dataset
## Things to Note
* a library of fMRIPrep images are stored on Juseless in `/data/project/singularity`.
* **CPU:**: 1 CPU was chosen as (with the option used in this example) there was
no appreciable speed difference between 1 CPU and multi-CPU jobs.
* **RAM:** 8GB is [recommended by upstream](https://brainscan.uwo.ca/research/cores/computational_core/img/Nov26-Fmriprep.pdf)
......
#!/bin/bash
# v1.0
# v1.1
CPUS='1'
RAM='8G'
DISK='90G'
LOGS_DIR="~/htcondor-templates/fmriprep/logs"
LOGS_DIR=~/htcondor-templates/fmriprep/logs
FMRIPREP='~/fmriprep-20.0.3.simg'
FMRIPREP='/data/project/singularity/fmriprep-20.0.5.simg'
BIDS_DIR='/data/project/llamas'
OUTPUT_DIR='/data/project/llamas/Derivatives'
FREESURFER_LIC='~/freesurfer_license.txt'
# create the logs dir if it doesn't exist
[ ! -d "${LOGS_DIR}" ] && mkdir -p "${LOGS_DIR}"
......@@ -29,10 +28,10 @@ executable = /usr/bin/singularity
# loop over all subjects
for sub in sub-{01..36}; do
printf "arguments = run --cleanenv -B ${BIDS_DIR} ${FMRIPREP} \
printf "arguments = run --cleanenv -B ${BIDS_DIR},/opt/freesurfer/6.0/license.txt:/opt/freesurfer/license.txt \
${FMRIPREP} \
--n_cpus ${CPUS} \
--skull-strip-fixed-seed \
--fs-license-file ${FREESURFER_LIC} \
--work-dir /tmp \
${BIDS_DIR} ${OUTPUT_DIR} participant \
--participant-label ${sub}\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment