Skip to content

Commit d69b480

Browse files
committed
auto: deploy new website
1 parent 09a7315 commit d69b480

File tree

9 files changed

+396
-123
lines changed

9 files changed

+396
-123
lines changed

apps/datalad/index.html

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,9 @@
678678
<ul class="md-nav__list">
679679

680680
<li class="md-nav__item">
681-
<a href="#setting-execution-uid" class="md-nav__link">
681+
<a href="#setting-a-regular-users-execution-uid" class="md-nav__link">
682682
<span class="md-ellipsis">
683-
Setting execution uid
683+
Setting a regular user's execution uid
684684
</span>
685685
</a>
686686

@@ -915,9 +915,9 @@
915915
<ul class="md-nav__list">
916916

917917
<li class="md-nav__item">
918-
<a href="#setting-execution-uid" class="md-nav__link">
918+
<a href="#setting-a-regular-users-execution-uid" class="md-nav__link">
919919
<span class="md-ellipsis">
920-
Setting execution uid
920+
Setting a regular user's execution uid
921921
</span>
922922
</a>
923923

@@ -963,12 +963,7 @@
963963

964964
<h1>Git-Annex and DataLad within containers</h1>
965965

966-
<p>Apps may be able to identify if the input dataset is handled with
967-
<em>DataLad</em> or <em>Git-Annex</em>, and pull down linked data that has not
968-
been fetched yet.
969-
One example of one such application is <em>MRIQC</em>, and all the examples
970-
on this documentation page will refer to it.</p>
971-
<div class="admonition important">
966+
<div class="admonition abstract">
972967
<p class="admonition-title">Summary</p>
973968
<p>Executing <em>BIDS-Apps</em> leveraging <em>DataLad</em>-controlled datasets
974969
within containers can be tricky.
@@ -981,6 +976,11 @@ <h1>Git-Annex and DataLad within containers</h1>
981976
<em>BIDS-Apps</em> on <em>DataLad</em>/<em>Git-annex</em>-managed datasets.</p>
982977
</div>
983978
<h2 id="datalad-and-docker"><em>DataLad</em> and <em>Docker</em><a class="headerlink" href="#datalad-and-docker" title="Permanent link">&para;</a></h2>
979+
<p>Apps may be able to identify if the input dataset is handled with
980+
<a href="https://www.datalad.org/"><em>DataLad</em></a> or <a href="https://git-annex.branchable.com"><em>git-annex</em></a>, and pull down linked data that has not
981+
been fetched yet.
982+
One example of one such application is <em>MRIQC</em>, and all the examples
983+
on this documentation page will refer to it.</p>
984984
<p>When executing <em>MRIQC</em> within <em>Docker</em> on a <em>DataLad</em> dataset
985985
(for instance, installed from <a href="https://openneuro.org"><em>OpenNeuro</em></a>),
986986
we will need to ensure the following settings are observed:</p>
@@ -990,25 +990,43 @@ <h2 id="datalad-and-docker"><em>DataLad</em> and <em>Docker</em><a class="header
990990
<li>the uid who is <em>executing MRIQC</em> within the container must
991991
have sufficient permissions to write in the tree.</li>
992992
</ul>
993-
<h3 id="setting-execution-uid">Setting execution uid<a class="headerlink" href="#setting-execution-uid" title="Permanent link">&para;</a></h3>
994-
<p>If the uid is not correct, we will likely encounter the following error:</p>
993+
<div class="admonition tip">
994+
<p class="admonition-title">Check <em>ReproNim</em> if the suggestions here did not work</p>
995+
<p>The actions suggested here are expected to work in most circumstances,
996+
but your system may have specific circumstances that require additional
997+
or alternative approaches.
998+
For instance, <a href="https://www.repronim.org/">the <em>ReproNim</em> project</a> maintains
999+
<a href="https://github.com/ReproNim/containers">ReproNim/containers</a>, a
1000+
<em>DataLad</em> dataset with ready-to-use Singularity images for released <em>BIDS Apps</em>, <em>NeuroDesktop</em> applications,
1001+
and other containers.
1002+
Its <a href="https://github.com/ReproNim/containers?tab=readme-ov-file#runnable-script"><code>README.md</code></a> guides through an approach via that dataset with <em>built-in</em> execution helper taking care about bind-mounts,
1003+
proxying critical <em>Git</em> configuration and potentially executing <em>Singularity</em> images via <em>Docker</em> (e.g., under OSX).</p>
1004+
<p>In the particular case of <em>MRIQC</em>, please consider updating (if necessary)
1005+
and fetching the required data before execution and then
1006+
add the <code>--no-datalad-get</code> argument to workaround issues with
1007+
<em>DataLad</em>.</p>
1008+
</div>
1009+
<h3 id="setting-a-regular-users-execution-uid">Setting a regular user's execution uid<a class="headerlink" href="#setting-a-regular-users-execution-uid" title="Permanent link">&para;</a></h3>
1010+
<p>If the execution uid does not match the uid of the user who installed
1011+
the <em>DataLad</em> dataset, we will likely encounter the following error
1012+
with relatively recent
1013+
<a href="https://github.blog/open-source/git/git-security-vulnerability-announced/#"><em>Git</em> versions (+2.35.2)</a>:</p>
9951014
<div class="highlight"><pre><span></span><code>datalad.runner.exception.CommandError: CommandError: &#39;git -c diff.ignoreSubmodules=none -c core.quotepath=false -c annex.merge-annex-branches=false annex find --not --in . --json --json-error-messages -c annex.dotfiles=true -- sub-0001/func/sub-0001_task-restingstate_acq-mb3_bold.nii.gz sub-0002/func/sub-0002_task-emomatching_acq-seq_bold.nii.gz sub-0002/func/sub-0002_task-restingstate_acq-mb3_bold.nii.gz sub-0001/func/sub-0001_task-emomatching_acq-seq_bold.nii.gz sub-0001/func/sub-0001_task-faces_acq-mb3_bold.nii.gz sub-0001/dwi/sub-0001_dwi.nii.gz sub-0002/func/sub-0002_task-workingmemory_acq-seq_bold.nii.gz sub-0001/anat/sub-0001_T1w.nii.gz sub-0002/anat/sub-0002_T1w.nii.gz sub-0001/func/sub-0001_task-gstroop_acq-seq_bold.nii.gz sub-0002/func/sub-0002_task-faces_acq-mb3_bold.nii.gz sub-0002/func/sub-0002_task-anticipation_acq-seq_bold.nii.gz sub-0002/dwi/sub-0002_dwi.nii.gz sub-0001/func/sub-0001_task-anticipation_acq-seq_bold.nii.gz sub-0001/func/sub-0001_task-workingmemory_acq-seq_bold.nii.gz sub-0002/func/sub-0002_task-gstroop_acq-seq_bold.nii.gz&#39; failed with exitcode 1 under /data [info keys: stdout_json] [err: &#39;git-annex: Git refuses to operate in this repository, probably because it is owned by someone else.
9961015

9971016
To add an exception for this directory, call:
9981017
git config --global --add safe.directory /data
9991018

10001019
git-annex: automatic initialization failed due to above problems&#39;]
10011020
</code></pre></div>
1002-
<p>Confusingly, following the suggestion from <em>DataLad</em> directly on the host
1003-
(<code>git config --global --add safe.directory /data</code>) will not work in this
1004-
case, because this line must be executed within the container.</p>
1021+
<p>Confusingly, following the suggestion from <em>DataLad</em>
1022+
(just propagated from <em>Git</em>) of executing
1023+
<code>git config --global --add safe.directory /data</code> will not work in this
1024+
case, because this line must be executed within the container.
1025+
However, containers are <em>transient</em> and the setting this configuration
1026+
on <em>Git</em> will not be propagated between executions unless advanced
1027+
actions are taken (such as mounting a <em>HOME</em> folder with the necessary settings).</p>
10051028
<p>Instead, we can override the default user executing within the container
10061029
(which is <code>root</code>, or uid = 0).
1007-
This can be achieved with
1008-
<a href="https://docs.docker.com/engine/containers/run/#user"><em>Docker</em>'s <code>-u</code>/<code>--user</code> option</a>:</p>
1009-
<div class="highlight"><pre><span></span><code>--user=[ user | user:group | uid | uid:gid | user:gid | uid:group ]
1010-
</code></pre></div>
1011-
<p>We can combine this option with <em>Bash</em>'s <code>id</code> command to ensure the current user's uid and group id (gid) are being set.
10121030
Let's update the last example in the previous
10131031
<a href="../docker/#running-a-niprep-directly-interacting-with-the-docker-engine"><em>Docker</em> execution section</a>:</p>
10141032
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>docker<span class="w"> </span>run<span class="w"> </span>-ti<span class="w"> </span>--rm<span class="w"> </span><span class="se">\</span>

0 commit comments

Comments
 (0)