Add software to Neurodocker

Neurodocker defines the instructions to install and configure software using YAML files. These files are known as templates. This page explains how to add a new template to Neurodocker.

The env and instructions values can use Jinja2 template language.

Example specification

This example installs jq, a command-line JSON processor.

# The name of the software. This becomes the name in the template registry.
# The CLI option would be rendered as `--jq`.
name: jq
# An alert that is printed when using this template in the CLI.
alert: Please be advised that this software uses
# How to install this software from pre-compiled binaries.
  # The available versions and their corresponding urls.
  # Arguments that the user can provide when using this template. These arguments
  # should be referenced in the `env` and/or `instructions`.
    - version
      install_path: /opt/jq-{{ self.version }}
  # Environment variables to set in the container. Keys and values must be strings.
    PATH: {{ self.install_path }}:$PATH
  # System packages that this software depends on.
    - ca-certificates
    - curl
    - curl
  # The installation instructions. Think of this like a shell scripts that installs
  # the software.
  instructions: |
    {{ self.install_dependencies() }}
    mkdir -p {{ self.install_path }}
    curl -fsSL --output {{ self.install_path }}/jq {{ self.urls[self.version]}}
    chmod +x {{ self.install_path }}/jq