layout |
---|
default |
Running a BIDS App on a local system can be performed using Docker, which is easy to install on all three major operating systems. To run the first stage of the example BIDS App for participant number 01 the user needs to open a console (terminal or cmd) and type:
{% highlight bash %} docker run -ti --rm \ -v /Users/srycajal/data/ds005:/bids_dataset:ro \ -v /Users/srycajal/outputs:/outputs \ bids/example:0.0.4 \ /bids_dataset /outputs participant --participant_label 01 {% endhighlight %}Where /Users/srycajal/data/ds005 is the path to the input dataset and /Users/srycajal/outputs the path where results should be stored. If the BIDS App was not run before on this machine, the docker image will be automatically downloaded from the Docker Hub.
Before a BIDS App can be run on a cluster, it first needs to be saved to an Singularity-compatible image file. This step needs to be performed outside of the cluster (for example on a laptop) and requires Docker:
{% highlight bash %} docker run --privileged -ti --rm \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /home/srycajal/singularity_images:/output \ singularityware/docker2singularity \ bids/example:0.0.4 {% endhighlight %}Where /home/srycajal/singularity_images is a path where the image will be stored. After transferring the .img file to a cluster it can be run like any other executable:
{% highlight bash %} ./bids_example-0.0.4.img /bids_dataset /outputs participant --participant_label 01 {% endhighlight %}{% if page.comments != false and site.disqus_shortname %}
{% endif %} {% if page.comments != false %}{% include disqus.html %}{% endif %}