Skip to content

Commit

Permalink
update version + examples for 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Kaczmarzyk committed Jun 11, 2018
1 parent 18314a7 commit cfe2024
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _Neurodocker_ is a command-line program that generates custom Dockerfiles and Si
Use the _Neurodocker_ Docker image (recommended):

```shell
$ docker run --rm kaczmarj/neurodocker:0.4.0rc1 --help
$ docker run --rm kaczmarj/neurodocker:0.4.0 --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 Down Expand Up @@ -226,29 +226,29 @@ Please see the [examples](examples) directory.

## Canonical examples

The canonical examples install ANTs version 2.2.0 on Ubuntu 18.04.
The canonical examples install ANTs version 2.2.0 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.0rc1 generate docker \
--base ubuntu:18.04 --pkg-manager apt --ants version=2.2.0
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate docker \
--base debian:stretch --pkg-manager apt --ants version=2.2.0

# Build image by piping Dockerfile to `docker build`
$ docker run --rm kaczmarj/neurodocker:0.4.0rc1 generate docker \
--base ubuntu:18.04 --pkg-manager apt --ants version=2.2.0 | docker build -
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate docker \
--base debian:stretch --pkg-manager apt --ants version=2.2.0 | docker build -
```

### Singularity

Install ANTs on Ubuntu 18.04.
Install ANTs on Debian 9 (Stretch).

```shell
$ docker run --rm kaczmarj/neurodocker:0.4.0rc1 generate singularity \
--base ubuntu:18.04 --pkg-manager apt --ants version=2.2.0
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate singularity \
--base debian:stretch --pkg-manager apt --ants version=2.2.0
```


Expand Down
21 changes: 9 additions & 12 deletions neurodocker/neurodocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def _list_of_kv(kv):
def _add_generate_common_arguments(parser):
p = parser

p.add_argument("-b", "--base", help="Base Docker image. Eg, ubuntu:17.04")
p.add_argument(
"-b", "--base", help="Base Docker image. E.g., debian:stretch")
p.add_argument(
"-p", "--pkg-manager", choices={'apt', 'yum'},
help="Linux package manager.")
Expand Down Expand Up @@ -127,8 +128,8 @@ def _add_generate_common_arguments(parser):
"mrtrix3": "Install MRtrix3. Valid keys are version (required),"
" method, and install_path",
"neurodebian": "Add NeuroDebian repository. Valid keys are "
"os_codename (eg zesty), server (eg usa-nh), and full"
" (if true, use non-free packages). Valid download"
"os_codename (e.g., zesty), server (e.g., usa-nh), and"
" full (if true, use non-free packages). Valid download"
" servers are {}.".format(_ndeb_servers),
"spm12": "Install SPM12 and its dependency, Matlab Compiler Runtime."
" Valid keys are version and install_path.",
Expand All @@ -140,8 +141,7 @@ def _add_generate_common_arguments(parser):
}

pkgs = p.add_argument_group(
title="software package arguments", description=pkgs_help['all']
)
title="software package arguments", description=pkgs_help['all'])

for pkg in _installation_implementations.keys():
if pkg == '_header':
Expand All @@ -151,8 +151,7 @@ def _add_generate_common_arguments(parser):
nargs = "*" if pkg == "mrtrix3" else "+"
pkgs.add_argument(
flag, dest=pkg, nargs=nargs, action=OrderedArgs, metavar="",
type=_list_of_kv, help=pkgs_help[pkg]
)
type=_list_of_kv, help=pkgs_help[pkg])


def _add_generate_docker_arguments(parser):
Expand Down Expand Up @@ -207,8 +206,7 @@ def create_parser():
"""Return command-line argument parser."""

parser = ArgumentParser(
description=__doc__, formatter_class=RawDescriptionHelpFormatter
)
description=__doc__, formatter_class=RawDescriptionHelpFormatter)

verbosity_choices = ('debug', 'info', 'warning', 'error', 'critical')
parser.add_argument("-v", "--verbosity", choices=verbosity_choices)
Expand All @@ -217,10 +215,9 @@ def create_parser():

subparsers = parser.add_subparsers(
dest="subparser_name", title="subcommands",
description="valid subcommands"
)
description="valid subcommands")

# `neurodocker gnerate` parsers.
# `neurodocker generate` parsers.
generate_parser = subparsers.add_parser(
'generate', help="generate recipes")
generate_subparsers = generate_parser.add_subparsers(
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.0.dev2'
__version__ = '0.4.0'


def get_gitversion():
Expand Down

0 comments on commit cfe2024

Please sign in to comment.