Skip to content

Commit aa9dcd8

Browse files
author
Jakub Kaczmarzyk
committed
enh: update for neurodocker version 0.4.0
1 parent 04cfa7a commit aa9dcd8

File tree

1 file changed

+41
-17
lines changed

1 file changed

+41
-17
lines changed

doc/users/neurodocker.rst

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ Neurodocker tutorial
77
This page covers the steps to create containers with Neurodocker_.
88

99
Neurodocker_ is a command-line program that enables users to generate Docker_
10-
containers that include neuroimaging software. These containers can be
11-
converted to Singularity_ containers for use in high-performance computing
12-
centers.
10+
containers and Singularity_ images that include neuroimaging software.
1311

1412
Requirements:
1513

16-
* Docker_
14+
* Docker_ or Singularity_
1715
* Internet connection
1816

1917

@@ -22,7 +20,7 @@ Usage
2220

2321
To view the Neurodocker help message
2422
::
25-
docker run --rm kaczmarj/neurodocker:v0.3.2 generate --help
23+
docker run --rm kaczmarj/neurodocker:0.4.0 generate --help
2624

2725
1. Users must specify a base Docker image and the package manager. Any Docker
2826
image on DockerHub can be used as your base image. Common base images
@@ -37,20 +35,32 @@ To view the Neurodocker help message
3735
machine into the container, and other operations. The list of supported
3836
neuroimaging software packages is available in the ``neurodocker`` help
3937
message.
40-
3. The ``neurodocker`` command will generate a Dockerfile. This Dockerfile can
41-
be used to build a Docker image with the ``docker build`` command.
38+
3. The ``neurodocker`` command will generate a Dockerfile or Singularity recipe.
39+
The Dockerfile can be used with the ``docker build`` command to build a
40+
Docker image. The Singularity recipe can be used to build a Singularity
41+
container with the ``singularity build`` command.
4242

4343

44-
Create a Dockerfile with FSL, Python 3.6, and Nipype
45-
----------------------------------------------------
44+
Create a Dockerfile or Singularity recipe with FSL, Python 3.6, and Nipype
45+
--------------------------------------------------------------------------
4646

4747
This command prints a Dockerfile (the specification for a Docker image) to the
4848
terminal.
4949
::
50-
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate \
50+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate docker \
5151
--base debian:stretch --pkg-manager apt \
5252
--fsl version=5.0.10 \
53-
--miniconda env_name=neuro \
53+
--miniconda create_env=neuro \
54+
conda_install="python=3.6 traits" \
55+
pip_install="nipype"
56+
57+
This command prints a Singularity recipe (the specification for a Singularity
58+
container) to the terminal.
59+
::
60+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate singularity \
61+
--base debian:stretch --pkg-manager apt \
62+
--fsl version=5.0.10 \
63+
--miniconda create_env=neuro \
5464
conda_install="python=3.6 traits" \
5565
pip_install="nipype"
5666

@@ -60,24 +70,38 @@ Build the Docker image
6070

6171
The Dockerfile can be saved and used to build the Docker image
6272
::
63-
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate \
73+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate docker \
6474
--base debian:stretch --pkg-manager apt \
6575
--fsl version=5.0.10 \
66-
--miniconda env_name=neuro \
76+
--miniconda create_env=neuro \
6777
conda_install="python=3.6 traits" \
6878
pip_install="nipype" > Dockerfile
6979
$ docker build --tag my_image .
7080
$ # or
7181
$ docker build --tag my_image - < Dockerfile
7282

7383

84+
Build the Singularity container
85+
-------------------------------
86+
87+
The Singularity recipe can be saved and used to build the Singularity container
88+
::
89+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate singularity \
90+
--base debian:stretch --pkg-manager apt \
91+
--fsl version=5.0.10 \
92+
--miniconda create_env=neuro \
93+
conda_install="python=3.6 traits" \
94+
pip_install="nipype" > Singularity
95+
$ singularity build Singularity my_nipype.sqsh
96+
97+
7498
Use NeuroDebian
7599
---------------
76100

77101
This example installs AFNI and ANTs from the NeuroDebian repositories. It also
78102
installs ``git`` and ``vim``.
79103
::
80-
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate \
104+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate [docker|singularity] \
81105
--base neurodebian:stretch --pkg-manager apt \
82106
--install afni ants git vim
83107

@@ -94,18 +118,18 @@ Create a container with ``dcm2niix``, Nipype, and jupyter notebook. Install
94118
Miniconda as a non-root user, and activate the Miniconda environment upon
95119
running the container.
96120
::
97-
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate \
121+
$ docker run --rm kaczmarj/neurodocker:0.4.0 generate docker \
98122
--base centos:7 --pkg-manager yum \
99123
--dcm2niix version=master \
100124
--user neuro \
101-
--miniconda env_name=neuro conda_install="jupyter traits nipype" \
125+
--miniconda create_env=neuro conda_install="jupyter traits nipype" \
102126
> Dockerfile
103127
$ docker build --tag my_nipype - < Dockerfile
104128

105129

106130
Copy local files into a container.
107131
::
108-
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate \
132+
$ docker run --rm kaczmarj/neurodocker:v0.3.2 generate [docker|singularity] \
109133
--base ubuntu:16.04 --pkg-manager apt \
110134
--copy relative/path/to/source.txt /absolute/path/to/destination.txt
111135

0 commit comments

Comments
 (0)