Skip to content

Commit

Permalink
Merge pull request #85 from oesteban/enh/one-session-one-run
Browse files Browse the repository at this point in the history
[Enh] One-session-one-run
  • Loading branch information
oesteban committed May 5, 2016
2 parents bc78a6d + f0a81c9 commit ab49505
Show file tree
Hide file tree
Showing 25 changed files with 710 additions and 482 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ RUN source activate crnenv && \
python -c "from mriqc.data import get_brainweb_1mm_normal; get_brainweb_1mm_normal()"

WORKDIR /root/
ADD build/files/run_mriqc /usr/bin/run_mriqc
ADD build/files/run_tests /usr/bin/run_tests
ADD build/files/run_dfcheck /usr/bin/run_dfcheck

RUN chmod +x /usr/bin/run_mriqc && \
chmod +x /usr/bin/run_tests && \
chmod +x /usr/bin/run_dfcheck
ADD build/files/run_* /usr/bin/
RUN chmod +x /usr/bin/run_*

ENTRYPOINT ["/usr/bin/run_mriqc"]
CMD ["--help"]
1 change: 1 addition & 0 deletions agave/docker-app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"label": "The MRIQC workflow in docker",
"defaultNodeCount": 1,
"defaultRequestedTime": "48:00:00",
"defaultQueue": "debug",
"shortDescription": "Run CRN's workflows in Agave's Dockerized cloud.",
"longDescription": "Generic template for running an arbitrary application in Agave's hosted Docker cloud. Apps should be a gzipped archive.",
"executionSystem": "docker.tacc.utexas.edu",
Expand Down
1 change: 0 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN git clone $GIT_URL && \
python setup.py install && \
python -c "from mriqc.data import get_brainweb_1mm_normal; get_brainweb_1mm_normal()"

WORKDIR /root/
ADD files/run_* /usr/bin/
RUN chmod +x /usr/bin/run_*

Expand Down
40 changes: 22 additions & 18 deletions build/circle_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,30 @@
set -x
set -e

declare -a MRIQC_TESTS=(
"-i data/ds003_downsampled -o outputs/ms-func/out -w outputs/ms-func/work --skip-anatomical" #
"-i data/ds003_downsampled -o outputs/ms-anat/out -w outputs/ms-anat/work --skip-functional --use-plugin plugin.yml --save-memory" #
# -i data/ds003_sub-01/ -o outputs/ss-all/out -w outputs/ss-all/work
)
# declare -a MRIQC_TESTS=(
# "-i data/ds003_downsampled -o outputs/ms-func/out -w outputs/ms-func/work --skip-anatomical" #
# "-i data/ds003_downsampled -o outputs/ms-anat/out -w outputs/ms-anat/work --skip-functional --use-plugin plugin.yml --save-memory" #
# # -i data/ds003_sub-01/ -o outputs/ss-all/out -w outputs/ss-all/work
# )

if [[ $CIRCLE_NODE_INDEX -eq 0 ]]; then
docker run -i -v /etc/localtime:/etc/localtime:ro --entrypoint="/usr/bin/run_tests" oesteban/mriqc
fi

i=0
for test_params in "${MRIQC_TESTS[@]}"; do
if [ $(($i % $CIRCLE_NODE_TOTAL)) -eq $CIRCLE_NODE_INDEX ]; then
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch oesteban/mriqc ${test_params}
fi
((i=i+1))
done
# i=0
# for test_params in "${MRIQC_TESTS[@]}"; do
# if [ $(($i % $CIRCLE_NODE_TOTAL)) -eq $CIRCLE_NODE_INDEX ]; then
# docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch oesteban/mriqc ${test_params}
# fi
# ((i=i+1))
# done

if [[ $CIRCLE_NODE_INDEX -eq 0 ]]; then
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_dfcheck" oesteban/mriqc -i /scratch/outputs/ms-func/out/fMRIQC.csv -r /root/src/mriqc/mriqc/data/tests/ds003_downsampled_fMRI.csv
elif [[ $CIRCLE_NODE_INDEX -eq 1 ]]; then
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_dfcheck" oesteban/mriqc -i /scratch/outputs/ms-anat/out/aMRIQC.csv -r /root/src/mriqc/mriqc/data/tests/ds003_downsampled_sMRI.csv
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch oesteban/mriqc -B /scratch/data/ds003_downsampled -d func -o outputs/ms-func/out -w outputs/ms-func/work
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_mriqc_plot" oesteban/mriqc -d func -o outputs/ms-func/out -w outputs/ms-func/work
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch oesteban/mriqc -B /scratch/data/ds003_downsampled -S $(seq -f '%02g' 01 05) -d anat -o outputs/ms-anat/out -w outputs/ms-anat/work
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_mriqc_plot" oesteban/mriqc -d anat -o outputs/ms-anat/out -w outputs/ms-anat/work
fi

if [[ $CIRCLE_NODE_INDEX -eq 1 ]]; then
docker run -i -v /etc/localtime:/etc/localtime:ro --entrypoint="/usr/bin/run_tests" oesteban/mriqc
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch oesteban/mriqc -B /scratch/data/ds003_downsampled -S $(seq -f '%02g' 06 13) -d anat -o outputs/ms-anat/out -w outputs/ms-anat/work
docker run -i -v /etc/localtime:/etc/localtime:ro -v ~/scratch:/scratch -w /scratch --entrypoint="/usr/bin/run_mriqc_plot" oesteban/mriqc -d anat -o outputs/ms-anat/out -w outputs/ms-anat/work
fi
4 changes: 4 additions & 0 deletions build/files/run_mriqc_plot
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
source activate crnenv

mriqc_plot $@
2 changes: 1 addition & 1 deletion mriqc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"""

__versionbase__ = '0.6.0'
__versionbase__ = '0.8.1'
__versionrev__ = 'a1'
__version__ = __versionbase__ + __versionrev__
__author__ = 'Oscar Esteban'
Expand Down
14 changes: 0 additions & 14 deletions mriqc/data/tests/ds003_downsampled_fMRI.csv

This file was deleted.

14 changes: 0 additions & 14 deletions mriqc/data/tests/ds003_downsampled_sMRI.csv

This file was deleted.

0 comments on commit ab49505

Please sign in to comment.