{ "info": { "author": "Jakub Kaczmarzyk", "author_email": "jakubk@mit.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Neurodocker\n\n[![build status](https://img.shields.io/circleci/project/github/kaczmarj/neurodocker/master.svg)](https://circleci.com/gh/kaczmarj/neurodocker/tree/master)\n[![docker pulls](https://img.shields.io/docker/pulls/kaczmarj/neurodocker.svg)](https://hub.docker.com/r/kaczmarj/neurodocker/)\n[![python versions](https://img.shields.io/pypi/pyversions/neurodocker.svg)](https://pypi.org/project/neurodocker/)\n\n_Neurodocker_ is a command-line program that generates custom Dockerfiles and Singularity recipes for neuroimaging and minifies existing containers.\n\n- Examples:\n - [Examples gallery](./examples)\n - [Canonical examples](#canonical-examples)\n - [Docker](#docker)\n - [Singularity](#singularity)\n - [Minimize existing Docker image](#minimize-existing-docker-image)\n - [Example of minimizing Docker image for FreeSurfer recon-all](https://github.com/freesurfer/freesurfer/issues/70#issuecomment-316361886)\n- [Known issues](#known-issues)\n\n# Installation\n\nUse the _Neurodocker_ Docker image (recommended):\n\n```shell\n$ docker run --rm kaczmarj/neurodocker:0.6.0 --help\n```\n\n_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)).\n\nThis project can also be installed with `pip`:\n\n```shell\n$ pip install neurodocker\n$ neurodocker --help\n```\n\nIf the `pip install` command above gives a permissions error, install as a non-root user:\n\n```shell\n$ pip install --user neurodocker\n```\n\nNote: it is not yet possible to minimize Docker containers using the _Neurodocker_ Docker image.\n\n# Supported software\n\n| software | argument | description |\n| --------------------------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **AFNI** | version\\* | latest |\n| | method | binaries (default), source. Install pre-compiled binaries or build form source. |\n| | install_path | Installation path. Default `/opt/afni-{version}`. |\n| | install_r | If true, install R. |\n| | install_r_pkgs | If true, install R and AFNI's R packages. |\n| | install_python2 | If true, install Python 2. |\n| | install_python3 | If true, install Python 3. |\n| **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. |\n| | method | binaries (default), source. |\n| | install_path | Installation path. Default `/opt/ants-{version}`. |\n| | cmake_opts | If `method=source`, options for `cmake`. |\n| | make_opts | If `method=source`, options for `make`. |\n| **Convert3D** | version\\* | 1.0.0 or nightly. |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/convert3d-{version}`. |\n| **dcm2niix** | version\\* | latest, git commit hash or branch. |\n| | method | source (default) |\n| | install_path | Installation path. Default `/opt/dcm2niix-{version}`. |\n| | cmake_opts | If `method=source`, options for `cmake`. |\n| | make_opts | If `method=source`, options for `make`. |\n| **FreeSurfer** | version\\* | 6.0.0-min |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/freesurfer-{version}`. |\n| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |\n| **FSL\\*\\*** | version\\* | 5.0.11, 5.0.10, 5.0.9, 5.0.8 |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/fsl-{version}`. |\n| | exclude_paths | Sequence of space-separated path(s) to exclude when inflating the tarball. |\n| **Matlab Compiler Runtime** | version\\* | 2018a, 2012-17[a-b], 2010a |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/matlabmcr-{version}`. |\n| **MINC** | version\\* | 1.9.15 |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/minc-{version}`. |\n| **Miniconda** | version | latest (default), all other hosted versions. |\n| | install_path | Installation path. Default `/opt/miniconda-{version}`. |\n| | create_env | Name of conda environment to create. |\n| | use_env | Name of previously installed environment. |\n| | conda_install | Packages to install with `conda`. E.g., `conda_install=\"python=3.6 numpy traits\"` |\n| | pip_install | Packages to install with `pip`. |\n| | activate | If true (default), activate this environment in container entrypoint. |\n| **MRIcron** | version\\* | latest, 1.0.20190902, 1.0.20190410, 1.0.20181114, 1.0.20180614, 1.0.20180404, 1.0.20171220 |\n| | install_path | Installation path. Default `/opt/mricron-{version}` |\n| **MRtrix3** | version\\* | 3.0 |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/mrtrix3-{version}`. |\n| **NeuroDebian** | os_codename\\* | Codename of the operating system (e.g., stretch, zesty). |\n| | server\\* | Server to download NeuroDebian packages from. Choose the one closest to you. See `neurodocker generate docker --help` for the full list of servers. |\n| | full | If true (default), use non-free sources. If false, use libre sources. |\n| **PETPVC** | version\\* | 1.2.2, 1.2.1, 1.2.0-b, 1.2.0-a, 1.1.0, 1.0.0 |\n| | method | binaries (default) |\n| | install_path | Installation path. Default `/opt/petpvc-{version}`. |\n| **SPM12** | version\\* | r7219, r6914, r6685, r6472, r6225 |\n| | install_path | Installation path. Default `/opt/spm12-{version}`. |\n| | | _Note: Matlab Compiler Runtime is installed when SPM12 is installed._ |\n| **VNC** | passwd\\* | Choose a password for this VNC server. |\n| | start_at_runtime | If true, start the VNC server at container runtime. False by default. |\n| | geometry | The geometry of the VNC session (e.g., `1920x1080`). |\n\n\\* required argument.\n\\*\\* 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).\n\n# Generate Dockerfile\n\n```\nusage: neurodocker generate docker [-h] [-b BASE] [-p {apt,yum}]\n [--add-to-entrypoint ADD_TO_ENTRYPOINT]\n [--copy COPY [COPY ...]]\n [--install INSTALL [INSTALL ...]]\n [--entrypoint ENTRYPOINT]\n [-e ENV [ENV ...]] [-r RUN]\n [--run-bash RUN_BASH] [-u USER]\n [-w WORKDIR] [-f FILE] [-o OUTPUT]\n [--no-print] [--afni [...]]\n [--ants [...]] [--convert3d [...]]\n [--dcm2niix [...]] [--freesurfer [...]]\n [--fsl [...]] [--matlabmcr [...]]\n [--minc [...]] [--miniconda [...]]\n [--mrtrix3 [[...]]] [--neurodebian [...]]\n [--petpvc [...]] [--spm12 [...]]\n [--vnc [...]] [--add ADD [ADD ...]]\n [--arg ARG [ARG ...]] [--cmd CMD [CMD ...]]\n [--expose EXPOSE [EXPOSE ...]]\n [--label LABEL [LABEL ...]]\n [--volume VOLUME [VOLUME ...]]\n\noptional arguments:\n -h, --help show this help message and exit\n -b BASE, --base BASE Base Docker image. E.g., debian:stretch\n -p {apt,yum}, --pkg-manager {apt,yum}\n Linux package manager.\n --add-to-entrypoint ADD_TO_ENTRYPOINT\n Add a command to the file /neurodocker/startup.sh,\n which is the container's default entrypoint.\n --copy COPY [COPY ...]\n Copy files into container. Use format ... \n --install INSTALL [INSTALL ...]\n Install system packages with apt-get or yum, depending\n on the package manager specified.\n --entrypoint ENTRYPOINT\n Set the container's entrypoint (Docker) / append to\n runscript (Singularity)\n -e ENV [ENV ...], --env ENV [ENV ...]\n Set environment variable(s). Use the format KEY=VALUE\n -r RUN, --run RUN Run a command when building container\n --run-bash RUN_BASH Run a command in bash\n -u USER, --user USER Switch current user (creates user if necessary)\n -w WORKDIR, --workdir WORKDIR\n Set working directory\n -f FILE, --file FILE Generate file from JSON. Overrides other `generate`\n arguments\n -o OUTPUT, --output OUTPUT\n If specified, save Dockerfile to file with this name.\n --no-print Do not print the generated file\n --add ADD [ADD ...] Dockerfile ADD instruction. Use format ... \n --arg ARG [ARG ...] Dockerfile ARG instruction. Use format\n KEY[=DEFAULT_VALUE] ...\n --cmd CMD [CMD ...] Dockerfile CMD instruction.\n --expose EXPOSE [EXPOSE ...]\n Dockerfile EXPOSE instruction.\n --label LABEL [LABEL ...]\n Dockerfile LABEL instruction.\n --volume VOLUME [VOLUME ...]\n Dockerfile VOLUME instruction.\n```\n\n# Generate Singularity recipe\n\n```\nusage: neurodocker generate singularity [-h] [-b BASE] [-p {yum,apt}]\n [--add-to-entrypoint ADD_TO_ENTRYPOINT]\n [--copy COPY [COPY ...]]\n [--install INSTALL [INSTALL ...]]\n [--entrypoint ENTRYPOINT]\n [-e ENV [ENV ...]] [-r RUN]\n [--run-bash RUN_BASH] [-u USER]\n [-w WORKDIR] [-f FILE] [-o OUTPUT]\n [--no-print] [--afni [...]]\n [--ants [...]] [--convert3d [...]]\n [--dcm2niix [...]]\n [--freesurfer [...]] [--fsl [...]]\n [--matlabmcr [...]] [--minc [...]]\n [--miniconda [...]]\n [--mrtrix3 [[...]]]\n [--neurodebian [...]]\n [--petpvc [...]] [--spm12 [...]]\n [--vnc [...]]\n\noptional arguments:\n -h, --help show this help message and exit\n -b BASE, --base BASE Base Docker image. E.g., debian:stretch\n -p {apt,yum}, --pkg-manager {apt,yum}\n Linux package manager.\n --add-to-entrypoint ADD_TO_ENTRYPOINT\n Add a command to the file /neurodocker/startup.sh,\n which is the container's default entrypoint.\n --copy COPY [COPY ...]\n Copy files into container. Use format ... \n --install INSTALL [INSTALL ...]\n Install system packages with apt-get or yum, depending\n on the package manager specified.\n --entrypoint ENTRYPOINT\n Set the container's entrypoint (Docker) / append to\n runscript (Singularity)\n -e ENV [ENV ...], --env ENV [ENV ...]\n Set environment variable(s). Use the format KEY=VALUE\n -r RUN, --run RUN Run a command when building container\n --run-bash RUN_BASH Run a command in bash\n -u USER, --user USER Switch current user (creates user if necessary)\n -w WORKDIR, --workdir WORKDIR\n Set working directory\n -f FILE, --file FILE Generate file from JSON. Overrides other `generate`\n arguments\n -o OUTPUT, --output OUTPUT\n If specified, save Dockerfile to file with this name.\n --no-print Do not print the generated file\n```\n\n# Examples\n\nPlease see the [examples](examples) directory.\n\n## Canonical examples\n\nThe canonical examples install ANTs version 2.3.1 on Debian 9 (Stretch).\n\n_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)).\n\n### Docker\n\n```shell\n$ docker run --rm kaczmarj/neurodocker:0.6.0 generate docker \\\n --base debian:stretch --pkg-manager apt --ants version=2.3.1\n\n# Build image by piping Dockerfile to `docker build`\n$ docker run --rm kaczmarj/neurodocker:0.6.0 generate docker \\\n --base debian:stretch --pkg-manager apt --ants version=2.3.1 | docker build -\n```\n\n### Singularity\n\nInstall ANTs on Debian 9 (Stretch).\n\n```shell\n$ docker run --rm kaczmarj/neurodocker:0.6.0 generate singularity \\\n --base debian:stretch --pkg-manager apt --ants version=2.3.1\n```\n\n## Minimize existing Docker image\n\n_Neurodocker_ must be `pip` installed for container minimization.\n\nIn 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.\n\n```shell\n# Create a Docker image with ANTs, and download a functional scan.\n$ 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\"\n$ neurodocker generate docker -b centos:7 -p yum --ants version=2.3.1 --run=\"$download_cmd\" | docker build -t ants:2.3.1 -\n\n# Run the container in the background.\n# The option --security-opt=seccomp:unconfined is important. Without this,\n# the trace will not be able to run in the container.\n$ docker run --rm -itd --name ants-container --security-opt=seccomp:unconfined ants:2.3.1\n\n# Output a ReproZip pack file in the current directory with the files\n# necessary to run antsMotionCorr.\n$ cmd=\"antsMotionCorr -d 3 -a /home/func.nii.gz -o /home/func_avg.nii.gz\"\n$ neurodocker reprozip trace ants-container \"$cmd\"\n# Create a Docker container with the contents of ReproZip's trace.\n$ reprounzip docker setup neurodocker-reprozip.rpz test\n```\n\n# Known issues\n\n- 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)).\n - Solution: do not use the `-t/--tty` flag, unless using the container interactively.\n- Attempting to rebuild into an existing Singularity image may raise an error.\n - Solution: remove the existing image or build a new image file.\n- The default apt `--install` option `--no-install-recommends` (that aims at minimizing container sizes) can cause unexpected behavior.\n - Solution: use `--install apt_opts=\"--quiet\"`\n - Please see the [examples](examples#--install) for more information.\n- FreeSurfer cannot find my license file.\n - Solution: get a free license from [FreeSurfer's website](https://surfer.nmr.mgh.harvard.edu/registration.html), and copy it into the container. To build the Docker image, please use the form `docker build .` instead of `docker build - < Dockerfile`. The latter form will not copy files into the image.\n - Please see the [examples](examples#freesurfer) for more information.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kaczmarj/neurodocker", "keywords": "containers neuroimaging reproducibility research", "license": "Apache License, 2.0", "maintainer": "", "maintainer_email": "", "name": "neurodocker", "package_url": "https://pypi.org/project/neurodocker/", "platform": "", "project_url": "https://pypi.org/project/neurodocker/", "project_urls": { "Homepage": "https://github.com/kaczmarj/neurodocker" }, "release_url": "https://pypi.org/project/neurodocker/0.6.0/", "requires_dist": [ "jinja2 (>=2.0)", "PyYAML (>=3.0)", "etelemetry", "docker (>=3.0) ; extra == 'dev'", "pytest-cov (>=2.0) ; extra == 'dev'", "spython (>=0.0.36) ; extra == 'dev'" ], "requires_python": ">=3.5", "summary": "Create custom containers for neuroimaging", "version": "0.6.0" }, "last_serial": 5923907, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "ab301273c5063f7a328741ca3d536000", "sha256": "6e7ff9ce1e4ee1d31eb791230aa9471097dde63384bc2826202b8b34ccfa3f31" }, "downloads": -1, "filename": "neurodocker-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab301273c5063f7a328741ca3d536000", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 51810, "upload_time": "2018-06-11T14:55:29", "url": "https://files.pythonhosted.org/packages/e3/5b/4b33add14e4ca008234a7bed518777665ccf538801254f2e8494dcb3780d/neurodocker-0.4.0-py3-none-any.whl" } ], "0.4.0rc1": [ { "comment_text": "", "digests": { "md5": "c94a6a3bbe1852b031bf4411b066cdb3", "sha256": "4bf49a5671e353d4684490fc404af92758af9dd17f6b65abd0d3d9b2073b0084" }, "downloads": -1, "filename": "neurodocker-0.4.0rc1-py3-none-any.whl", "has_sig": false, "md5_digest": "c94a6a3bbe1852b031bf4411b066cdb3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 48636, "upload_time": "2018-04-27T14:53:05", "url": "https://files.pythonhosted.org/packages/75/a3/32b312b8b8bfd7b836cd5f3837bd0961d2993ea691fb5f582e82f0edd1c1/neurodocker-0.4.0rc1-py3-none-any.whl" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "9f889cc8167fdc3d4b93712ca4eef222", "sha256": "d11681edfa9a3039adfe30a42b61665d9e77b9c27030947e64427e953785fb25" }, "downloads": -1, "filename": "neurodocker-0.4.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9f889cc8167fdc3d4b93712ca4eef222", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 53119, "upload_time": "2018-08-02T19:17:37", "url": "https://files.pythonhosted.org/packages/6f/6c/a31638c027ba0cf0fd40db8525eeb945183c378bc367dc3dc41f32bd6250/neurodocker-0.4.1-py3-none-any.whl" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "efe373961f913f13e7a3ff0568779771", "sha256": "874d1e8c04e4dca52a231b880144d214fe7b4d08b73df08744de0c428d8d48e4" }, "downloads": -1, "filename": "neurodocker-0.4.2-py3-none-any.whl", "has_sig": false, "md5_digest": "efe373961f913f13e7a3ff0568779771", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 53618, "upload_time": "2018-11-02T19:31:33", "url": "https://files.pythonhosted.org/packages/a7/03/161b13fbda8ddcbdfc010a2afe897c332b0f4c4f178c3489c8b7c302f6c4/neurodocker-0.4.2-py3-none-any.whl" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "946da2380d365d3b3fd7a7e8fb8a551e", "sha256": "5b86fc318eff06f53e31d82eaeb53585aa05438ea57c4b8010a41b5772312f86" }, "downloads": -1, "filename": "neurodocker-0.4.3-py3-none-any.whl", "has_sig": false, "md5_digest": "946da2380d365d3b3fd7a7e8fb8a551e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 54691, "upload_time": "2019-01-03T19:45:29", "url": "https://files.pythonhosted.org/packages/cc/93/31b37732c85c26ffddf71771188334acd1e97d14ef2dd644f0a0da50ec62/neurodocker-0.4.3-py3-none-any.whl" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "33d05f7ae30fe9e398f7c8c733e0af05", "sha256": "050d0fd6127010b56023355883b98dedec6499fc84e0cd6e5ed0c85291e4a40c" }, "downloads": -1, "filename": "neurodocker-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "33d05f7ae30fe9e398f7c8c733e0af05", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 59100, "upload_time": "2019-04-18T15:14:44", "url": "https://files.pythonhosted.org/packages/62/ab/aecdd1aaf749c5af43012acc35bda2f519fafa01d867b246003f6e352708/neurodocker-0.5.0-py3-none-any.whl" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "e41e5245a4adb8ee7d08e63b71c9ecd8", "sha256": "d41454b856f4477c837f854c60fb1891b7000097420a09cb5e62b0764ddcaf82" }, "downloads": -1, "filename": "neurodocker-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e41e5245a4adb8ee7d08e63b71c9ecd8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 60197, "upload_time": "2019-10-03T14:57:47", "url": "https://files.pythonhosted.org/packages/d9/c9/6a3d93af65a9ed7223a20ade3c47573050a1e87517700bf5585509fd6a52/neurodocker-0.6.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e41e5245a4adb8ee7d08e63b71c9ecd8", "sha256": "d41454b856f4477c837f854c60fb1891b7000097420a09cb5e62b0764ddcaf82" }, "downloads": -1, "filename": "neurodocker-0.6.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e41e5245a4adb8ee7d08e63b71c9ecd8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 60197, "upload_time": "2019-10-03T14:57:47", "url": "https://files.pythonhosted.org/packages/d9/c9/6a3d93af65a9ed7223a20ade3c47573050a1e87517700bf5585509fd6a52/neurodocker-0.6.0-py3-none-any.whl" } ] }