Skip to content

Commit

Permalink
Merge pull request #8 from DCAN-Labs/hotfix/singularity
Browse files Browse the repository at this point in the history
hotfix for singularity containers
  • Loading branch information
dasturge authored Mar 25, 2019
2 parents 9268be1 + afa87d7 commit 843d1cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,16 @@ docker run --rm \
To call using Singularity:

```{bash}
singularity run \
env -i singularity run \
-B /path/to/bids_dataset:/bids_input \
-B /path/to/outputs:/output \
-B /path/to/freesurfer/license:/license \
./abcd-hcp-pipeline.img /bids_input /output --freesurfer-license=/license [OPTIONS]
-B /path/to/freesurfer/license.txt:/opt/freesurfer/license.txt \
./abcd-hcp-pipeline.img /bids_input /output --freesurfer-license=/opt/freesurfer/license.txt [OPTIONS]
```

notice that the license is now mounted directly into the freesurfer folder,
and the call to singularity is prefaced by "env -i"

### Options:

```{bash}
Expand Down
2 changes: 2 additions & 0 deletions app/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ def validate_license(freesurfer_license):
assert os.path.exists(license_txt), \
'freesurfer license.txt not located. You can provide a license ' \
'file using the --freesurfer-license <LICENSE> argument.'
elif os.path.normpath(license_txt) == os.path.normpath(freesurfer_license):
pass
else:
import shutil
shutil.copy(freesurfer_license, license_txt)
Expand Down

0 comments on commit 843d1cf

Please sign in to comment.