Skip to content

Commit

Permalink
update to version 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Kaczmarzyk committed Jan 3, 2019
1 parent 18c7a8b commit 0b11009
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 75 deletions.
140 changes: 66 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ _Neurodocker_ is a command-line program that generates custom Dockerfiles and Si
- [Example of minimizing Docker image for FreeSurfer recon-all](https://github.com/freesurfer/freesurfer/issues/70#issuecomment-316361886)
- [Known issues](#known-issues)


# Installation

Use the _Neurodocker_ Docker image (recommended):

```shell
$ docker run --rm kaczmarj/neurodocker:0.4.2 --help
$ docker run --rm kaczmarj/neurodocker:0.4.3 --help
```

_Note_: Do not use the `-t/--tty` flag with `docker run` or non-printable characters will be a part of the output (see [moby/moby#8513 (comment)](https://github.com/moby/moby/issues/8513#issuecomment-216191236)).
Expand All @@ -41,73 +40,70 @@ $ pip install --user neurodocker

Note: it is not yet possible to minimize Docker containers using the _Neurodocker_ Docker image.


# Supported software

| software | argument | description |
| -------- | -------- | ----------- |
| **AFNI** | version* | latest |
| | method | binaries (default), source. Install pre-compiled binaries or build form source. |
| | install_path | Installation path. Default `/opt/afni-{version}`. |
| | install_r | If true, install R. |
| | install_r_pkgs | If true, install R and AFNI's R packages. |
| | install_python2 | If true, install Python 2. |
| | install_python3 | If true, install Python 3. |
| **ANTs** | version* | 2.3.1, 2.3.0, 2.2.0, 2.1.0, 2.0.3, or 2.0.0. If `method=source`, version can be a git commit hash or branch. |
| | method | binaries (default), source. |
| | install_path | Installation path. Default `/opt/ants-{version}`. |
| | cmake_opts | If `method=source`, options for `cmake`. |
| | make_opts | If `method=source`, options for `make`. |
| **Convert3D** | version* | 1.0.0 or nightly. |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/convert3d-{version}`. |
| **dcm2niix** | version* | latest, git commit hash or branch. |
| | method | source (default) |
| | install_path | Installation path. Default `/opt/dcm2niix-{version}`. |
| | cmake_opts | If `method=source`, options for `cmake`. |
| | make_opts | If `method=source`, options for `make`. |
| **FreeSurfer** | version* | 6.0.0-min |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/freesurfer-{version}`. |
| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |
| | license_path | Relative path to license file. If provided, this file will be copied into the Docker image. Must be within the build context. |
| **FSL**** | version* | 5.0.11, 5.0.10, 5.0.9, 5.0.8 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/fsl-{version}`. |
| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |
| **Matlab Compiler Runtime** | version* | 2018a, 2012-17[a-b], 2010a |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/matlabmcr-{version}`. |
| **MINC** | version* | 1.9.15 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/minc-{version}`. |
| **Miniconda** | version | latest (default), all other hosted versions. |
| | install_path | Installation path. Default `/opt/miniconda-{version}`. |
| | create_env | Name of conda environment to create. |
| | use_env | Name of previously installed environment. |
| | 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. |
| **MRtrix3** | version* | 3.0 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/mrtrix3-{version}`. |
| **NeuroDebian** | os_codename* | Codename of the operating system (e.g., stretch, zesty). |
| | server* | Server to download NeuroDebian packages from. Choose the one closest to you. See `neurodocker generate docker --help` for the full list of servers. |
| | full | If true (default), use non-free sources. If false, use libre sources. |
| **PETPVC** | version* | 1.2.2, 1.2.1, 1.2.0-b, 1.2.0-a, 1.1.0, 1.0.0 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/petpvc-{version}`. |
| **SPM12** | version* | r7219, r6914, r6685, r6472, r6225 |
| | install_path | Installation path. Default `/opt/spm12-{version}`. |
| | | _Note: Matlab Compiler Runtime is installed when SPM12 is installed._ |
| **VNC** | passwd* | Choose a password for this VNC server. |
| | start_at_runtime | If true, start the VNC server at container runtime. False by default. |
| | geometry | The geometry of the VNC session (e.g., `1920x1080`). |


\* required argument.
** FSL is non-free. If you are considering commercial use of FSL, please consult the [relevant license](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence).

| software | argument | description |
| --------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **AFNI** | version\* | latest |
| | method | binaries (default), source. Install pre-compiled binaries or build form source. |
| | install_path | Installation path. Default `/opt/afni-{version}`. |
| | install_r | If true, install R. |
| | install_r_pkgs | If true, install R and AFNI's R packages. |
| | install_python2 | If true, install Python 2. |
| | install_python3 | If true, install Python 3. |
| **ANTs** | version\* | 2.3.1, 2.3.0, 2.2.0, 2.1.0, 2.0.3, or 2.0.0. If `method=source`, version can be a git commit hash or branch. |
| | method | binaries (default), source. |
| | install_path | Installation path. Default `/opt/ants-{version}`. |
| | cmake_opts | If `method=source`, options for `cmake`. |
| | make_opts | If `method=source`, options for `make`. |
| **Convert3D** | version\* | 1.0.0 or nightly. |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/convert3d-{version}`. |
| **dcm2niix** | version\* | latest, git commit hash or branch. |
| | method | source (default) |
| | install_path | Installation path. Default `/opt/dcm2niix-{version}`. |
| | cmake_opts | If `method=source`, options for `cmake`. |
| | make_opts | If `method=source`, options for `make`. |
| **FreeSurfer** | version\* | 6.0.0-min |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/freesurfer-{version}`. |
| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |
| | license_path | Relative path to license file. If provided, this file will be copied into the Docker image. Must be within the build context. |
| **FSL\*\*** | version\* | 5.0.11, 5.0.10, 5.0.9, 5.0.8 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/fsl-{version}`. |
| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |
| **Matlab Compiler Runtime** | version\* | 2018a, 2012-17[a-b], 2010a |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/matlabmcr-{version}`. |
| **MINC** | version\* | 1.9.15 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/minc-{version}`. |
| **Miniconda** | version | latest (default), all other hosted versions. |
| | install_path | Installation path. Default `/opt/miniconda-{version}`. |
| | create_env | Name of conda environment to create. |
| | use_env | Name of previously installed environment. |
| | 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. |
| **MRtrix3** | version\* | 3.0 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/mrtrix3-{version}`. |
| **NeuroDebian** | os_codename\* | Codename of the operating system (e.g., stretch, zesty). |
| | server\* | Server to download NeuroDebian packages from. Choose the one closest to you. See `neurodocker generate docker --help` for the full list of servers. |
| | full | If true (default), use non-free sources. If false, use libre sources. |
| **PETPVC** | version\* | 1.2.2, 1.2.1, 1.2.0-b, 1.2.0-a, 1.1.0, 1.0.0 |
| | method | binaries (default) |
| | install_path | Installation path. Default `/opt/petpvc-{version}`. |
| **SPM12** | version\* | r7219, r6914, r6685, r6472, r6225 |
| | install_path | Installation path. Default `/opt/spm12-{version}`. |
| | | _Note: Matlab Compiler Runtime is installed when SPM12 is installed._ |
| **VNC** | passwd\* | Choose a password for this VNC server. |
| | start_at_runtime | If true, start the VNC server at container runtime. False by default. |
| | geometry | The geometry of the VNC session (e.g., `1920x1080`). |

\* required argument.
\*\* FSL is non-free. If you are considering commercial use of FSL, please consult the [relevant license](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence).

# Generate Dockerfile

Expand Down Expand Up @@ -235,15 +231,14 @@ The canonical examples install ANTs version 2.3.1 on Debian 9 (Stretch).

_Note_: Do not use the `-t/--tty` flag with `docker run` or non-printable characters will be a part of the output (see [moby/moby#8513 (comment)](https://github.com/moby/moby/issues/8513#issuecomment-216191236)).


### Docker

```shell
$ docker run --rm kaczmarj/neurodocker:0.4.2 generate docker \
$ docker run --rm kaczmarj/neurodocker:0.4.3 generate docker \
--base debian:stretch --pkg-manager apt --ants version=2.3.1

# Build image by piping Dockerfile to `docker build`
$ docker run --rm kaczmarj/neurodocker:0.4.2 generate docker \
$ docker run --rm kaczmarj/neurodocker:0.4.3 generate docker \
--base debian:stretch --pkg-manager apt --ants version=2.3.1 | docker build -
```

Expand All @@ -252,18 +247,16 @@ $ docker run --rm kaczmarj/neurodocker:0.4.2 generate docker \
Install ANTs on Debian 9 (Stretch).

```shell
$ docker run --rm kaczmarj/neurodocker:0.4.2 generate singularity \
$ docker run --rm kaczmarj/neurodocker:0.4.3 generate singularity \
--base debian:stretch --pkg-manager apt --ants version=2.3.1
```


## Minimize existing Docker image

_Neurodocker_ must be `pip` installed for container minimization.

In the following example, a Docker image is built with ANTs version 2.3.1 and a functional scan. The image is minified for running `antsMotionCorr`. The original ANTs Docker image is 1.85 GB, and the "minified" image is 365 MB.


```shell
# Create a Docker image with ANTs, and download a functional scan.
$ download_cmd="curl -sSL -o /home/func.nii.gz http://psydata.ovgu.de/studyforrest/phase2/sub-01/ses-movie/func/sub-01_ses-movie_task-movie_run-1_bold.nii.gz"
Expand All @@ -282,7 +275,6 @@ $ neurodocker reprozip trace ants-container "$cmd"
$ reprounzip docker setup neurodocker-reprozip.rpz test
```


# Known issues

- Using the `-t/--tty` option in `docker run` produces non-printable characters in the generated Dockerfile or Singularity recipe (see [moby/moby#8513 (comment)](https://github.com/moby/moby/issues/8513#issuecomment-216191236)).
Expand Down
2 changes: 1 addition & 1 deletion neurodocker/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Copied from https://github.com/nipy/nipype/blob/master/nipype/info.py.
"""

__version__ = '0.4.3-dev'
__version__ = '0.4.3'


def get_gitversion():
Expand Down

0 comments on commit 0b11009

Please sign in to comment.