Skip to content

Commit

Permalink
ADD: mricron (#300)
Browse files Browse the repository at this point in the history
* add mricron pre-compiled

* add latest compiled version

* add examples for mricron
  • Loading branch information
kaczmarj authored Oct 3, 2019
1 parent aaa7671 commit f49345e
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ Note: it is not yet possible to minimize Docker containers using the _Neurodocke
| | conda_install | Packages to install with `conda`. E.g., `conda_install="python=3.6 numpy traits"` |
| | pip_install | Packages to install with `pip`. |
| | activate | If true (default), activate this environment in container entrypoint. |
| **MRIcron** | version\* | latest, 1.0.20190902, 1.0.20190410, 1.0.20181114, 1.0.20180614, 1.0.20180404, 1.0.20171220 |
| | install_path | Installation path. Default `/opt/mricron-{version}` |
| **MRtrix3** | version\* | 3.0 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/mrtrix3-{version}`. |
Expand Down
8 changes: 8 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ All of the examples below use `debian:stretch` as the base image, but any Docker
- [Matlab Compiler Runtime (MCR)](#matlab-compiler-runtime-mcr)
- [MINC](#minc)
- [Miniconda](#miniconda)
- [MRIcron](#mricron)
- [MRtrix3](#mrtrix3)
- [NeuroDebian](#neurodebian)
- [PETPVC](#petpvc)
Expand Down Expand Up @@ -318,6 +319,13 @@ neurodocker generate [docker|singularity] --base=debian:stretch --pkg-manager=ap
yaml_file=/opt/environment.yml
```

## MRIcron

```shell
neurodocker generate [docker|singularity] --base=debian:stretch --pkg-manager=apt \
--mricron version=latest
```

## MRtrix3

```shell
Expand Down
10 changes: 10 additions & 0 deletions neurodocker/interfaces/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ def render_env(self):
return super().render_env()


class MINC(_BaseInterface):
"""Create instance of MRIcron object."""

_name = 'mricron'
_pretty_name = 'MRIcron'

def __init__(self, *args, **kwargs):
super().__init__(self._name, *args, **kwargs)


class MRtrix3(_BaseInterface):
"""Create instance of MRtrix3 object."""

Expand Down
3 changes: 3 additions & 0 deletions neurodocker/neurodocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ def _add_generate_common_arguments(parser):
" (defaults to latest). The options conda_install and"
" pip_install accept strings of packages: conda_install="
'"python=3.6 numpy traits".',
"mricron":
"Install MRIcron. valid keys are version (required), method, and"
" install_path.",
"mrtrix3":
"Install MRtrix3. Valid keys are version (required),"
" method, and install_path",
Expand Down
28 changes: 28 additions & 0 deletions neurodocker/templates/mricron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Instructions to install MRIcron.
#
# Repository: https://github.com/neurolabusc/MRIcron

generic:
binaries:
urls:
latest: https://github.com/neurolabusc/MRIcron/releases/latest/download/MRIcron_linux.zip
"1.0.20190902": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190902/MRIcron_linux.zip
"1.0.20190410": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190410/mricron_linux.zip
"1.0.20181114": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20181114/mricron_linux.zip
"1.0.20180614": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180614/mricron_linux.zip
"1.0.20180404": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180404/mricron_lx64.zip
"1.0.20171220": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20171220/mricron_linux.zip
dependencies:
apt: libgtk2.0-0
yum: gtk2
env:
PATH: "{{ mricron.install_path }}:$PATH"
instructions: |
{{ mricron.install_dependencies() }}
echo "Downloading MRIcron ..."
mkdir -p {{ mricron.install_path }}
curl {{ mricron.curl_opts }} -O {{ mricron.binaries_url }}
unzip "*cron*.zip"
rm -f "*cron*.zip"
mv mricron/* {{ mricron.install_path }}
rmdir mricron

0 comments on commit f49345e

Please sign in to comment.