diff --git a/.codespellrc b/.codespellrc deleted file mode 100644 index aa9f1312..00000000 --- a/.codespellrc +++ /dev/null @@ -1,4 +0,0 @@ -[codespell] -skip = .git,*.pdf,*.svg,versioneer.py,_version.py -# didi -- some name Dear to someone -ignore-words-list = didi diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index c1fbb111..264e0896 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -1,3 +1,4 @@ +--- # this workflow bootstraps the testing of the build the docker images # # - this will run the python script used to generate the workflows @@ -8,16 +9,16 @@ name: bootstrap concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true on: - push: - branches: [ "master" ] - paths: - - .github/workflows/bootstrap.yml - - .github/workflows/create_workflows.py - - neurodocker/** + push: + branches: [master] + paths: + - .github/workflows/bootstrap.yml + - .github/workflows/create_workflows.py + - neurodocker/** # Uses the cron schedule for github actions # @@ -33,53 +34,53 @@ on: # │ │ │ │ │ # * * * * * - schedule: - - cron: 0 0 1,15 * * + schedule: + - cron: 0 0 1,15 * * # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - inputs: - software_name: - description: 'software to test' - required: true - default: 'all' + workflow_dispatch: + inputs: + software_name: + description: software to test + required: true + default: all permissions: - contents: write - actions: write + contents: write + actions: write jobs: - bootstrap: - runs-on: ubuntu-22.04 + bootstrap: + runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.CI_FLOW }} + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.CI_FLOW }} - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' - - name: Install dependencies - run: python -m pip install jinja2 pyyaml + - name: Install dependencies + run: python -m pip install jinja2 pyyaml - - name: Create workflows - run: | - software_name=${{ inputs.software_name }} - if [ -z "$software_name" ]; then - software_name="all" - fi - if [ "$software_name" = "all" ]; then - echo "testing all software" - else - echo "testing ${software_name}" - fi - git checkout -b test_docker_build - python .github/workflows/create_workflows.py --software_name ${software_name} - ls -l .github/workflows - git add . - git config --global user.email "no-reply@repronim.org" - git config --global user.name "Repronim neurodocker bot" - git commit -am "added new workflows" - git push origin --force test_docker_build + - name: Create workflows + run: | + software_name=${{ inputs.software_name }} + if [ -z "$software_name" ]; then + software_name="all" + fi + if [ "$software_name" = "all" ]; then + echo "testing all software" + else + echo "testing ${software_name}" + fi + git checkout -b test_docker_build + python .github/workflows/create_workflows.py --software_name ${software_name} + ls -l .github/workflows + git add . + git config --global user.email "no-reply@repronim.org" + git config --global user.name "Repronim neurodocker bot" + git commit -am "added new workflows" + git push origin --force test_docker_build diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 48ad5f28..00000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Codespell - -on: - push: - branches: [master] - pull_request: - branches: [master] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - codespell: - name: Check for spelling errors - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Codespell - uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/create_workflows.py b/.github/workflows/create_workflows.py index 29eeb269..646a4d5e 100644 --- a/.github/workflows/create_workflows.py +++ b/.github/workflows/create_workflows.py @@ -23,6 +23,7 @@ and on the branch where the workflows are pushed to (currently "test_docker_build"). """ + import argparse from pathlib import Path diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 58f6cc50..f409baa3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,26 +1,27 @@ +--- on: - push: - branches: - - master + push: + branches: + - master permissions: - contents: write + contents: write jobs: - build_docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - name: Install neurodocker - run: python -m pip install --editable .[all] - - name: build docs - run: | - make -C docs cli - make -C docs list - sphinx-build docs docs-build - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: docs-build # The folder the action should deploy. + build_docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install neurodocker + run: python -m pip install --editable .[all] + - name: build docs + run: | + make -C docs cli + make -C docs list + sphinx-build docs docs-build + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: docs-build # The folder the action should deploy. diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d6b86ec7..fbc3063c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,27 +1,28 @@ +--- name: Publish to pypi on Github release on: - release: - types: [published] + release: + types: [published] jobs: - pypi-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 + pypi-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' - - name: Install build & twine - run: python -m pip install build twine + - name: Install build & twine + run: python -m pip install build twine - - name: Publish to pypi - run: | - python -m build - twine upload dist/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + - name: Publish to pypi + run: | + python -m build + twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index c09a5c9e..50dc06f7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,43 +1,44 @@ +--- name: CI concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true on: - pull_request: - branches: [ master ] + pull_request: + branches: [master] jobs: - run-tests: - runs-on: ubuntu-22.04 - strategy: - matrix: - python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] - fail-fast: false - steps: - - name: Install Apptainer - env: - VERSION: 1.1.5 - run: | - sudo apt-get update - sudo apt-get install -y wget - wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer_${VERSION}_amd64.deb - wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer-suid_${VERSION}_amd64.deb - sudo apt-get install --yes ./apptainer* - - name: Set Apptainer/Singularity environment variables - run: | - # Give reproenv the full path to apptainer, so it still works with `sudo`. - echo REPROENV_APPTAINER_PROGRAM=apptainer >> $GITHUB_ENV - echo APPTAINER_CACHEDIR=/dev/shm/$(whoami)/singularity >> $GITHUB_ENV - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install neurodocker - run: python -m pip install --editable .[dev] - - name: Run python tests - run: pytest --numprocesses auto - - name: Get code coverage - run: codecov + run-tests: + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] + fail-fast: false + steps: + - name: Install Apptainer + env: + VERSION: 1.1.5 + run: | + sudo apt-get update + sudo apt-get install -y wget + wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer_${VERSION}_amd64.deb + wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer-suid_${VERSION}_amd64.deb + sudo apt-get install --yes ./apptainer* + - name: Set Apptainer/Singularity environment variables + run: | + # Give reproenv the full path to apptainer, so it still works with `sudo`. + echo REPROENV_APPTAINER_PROGRAM=apptainer >> $GITHUB_ENV + echo APPTAINER_CACHEDIR=/dev/shm/$(whoami)/singularity >> $GITHUB_ENV + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install neurodocker + run: python -m pip install --editable .[dev] + - name: Run python tests + run: pytest --numprocesses auto + - name: Get code coverage + run: codecov diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1af86532..11904dbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,43 +1,44 @@ +--- name: Auto-release on PR merge on: # ATM, this is the closest trigger to a PR merging - push: - branches: - - master + push: + branches: + - master env: - AUTO_VERSION: v10.37.6 + AUTO_VERSION: v10.37.6 jobs: - auto-release: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" - steps: - - uses: actions/checkout@v4 + auto-release: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" + steps: + - uses: actions/checkout@v4 - - name: Prepare repository + - name: Prepare repository # Fetch full git history and tags - run: git fetch --unshallow --tags + run: git fetch --unshallow --tags - - name: Unset header + - name: Unset header # checkout@v2 adds a header that makes branch protection report errors # because the Github action bot is not a collaborator on the repo - run: git config --local --unset http.https://github.com/.extraheader - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - - - name: Download auto - run: | - auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" - wget -O- "$auto_download_url" | gunzip > ~/auto - chmod a+x ~/auto - - - name: Create release - run: | - ~/auto shipit -vv - env: - GH_TOKEN: ${{ secrets.AUTO_USER_TOKEN }} + run: git config --local --unset http.https://github.com/.extraheader + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Download auto + run: | + auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" + wget -O- "$auto_download_url" | gunzip > ~/auto + chmod a+x ~/auto + + - name: Create release + run: | + ~/auto shipit -vv + env: + GH_TOKEN: ${{ secrets.AUTO_USER_TOKEN }} diff --git a/.github/workflows/run_precommit.yml b/.github/workflows/run_precommit.yml new file mode 100644 index 00000000..ac8f85d4 --- /dev/null +++ b/.github/workflows/run_precommit.yml @@ -0,0 +1,15 @@ +--- +name: pre-commit + +on: + pull_request: + push: + branches: [master] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fde33c10..52384761 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,25 +1,26 @@ +--- # CRON job to close inactive issues. # https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues name: Close inactive issues on: - schedule: - - cron: "30 1 * * *" + schedule: + - cron: 30 1 * * * jobs: - close-issues: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v9 - with: - days-before-issue-stale: 60 - days-before-issue-close: 60 - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." - close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." - days-before-pr-stale: -1 - days-before-pr-close: -1 - repo-token: ${{ secrets.GITHUB_TOKEN }} + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 60 + days-before-issue-close: 60 + stale-issue-label: stale + stale-issue-message: This issue is stale because it has been open for 30 days with no activity. + close-issue-message: This issue was closed because it has been inactive for 14 days since being marked as stale. + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test_doc.yml b/.github/workflows/test_doc.yml index 41d56af1..6ce8ceca 100644 --- a/.github/workflows/test_doc.yml +++ b/.github/workflows/test_doc.yml @@ -1,3 +1,4 @@ +--- name: test examples concurrency: @@ -6,12 +7,12 @@ concurrency: on: push: - branches: [ "master" ] + branches: [master] pull_request: - branches: [ "master" ] + branches: [master] schedule: - - cron: 0 0 1 * * + - cron: 0 0 1 * * # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -21,20 +22,20 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' - - name: Install neurodocker - run: python -m pip install --editable . + - name: Install neurodocker + run: python -m pip install --editable . - - name: test common uses - run: bash < docs/common_uses/conda_multiple_env.txt + - name: test common uses + run: bash < docs/common_uses/conda_multiple_env.txt - - name: "test nipype_tuto: failure expected" - run: bash < docs/examples/nipype_tuto.txt + - name: 'test nipype_tuto: failure expected' + run: bash < docs/examples/nipype_tuto.txt # do not fail the workflow if the example fails - continue-on-error: true + continue-on-error: true diff --git a/.github/workflows/type_checks.yml b/.github/workflows/type_checks.yml new file mode 100644 index 00000000..f325bb8e --- /dev/null +++ b/.github/workflows/type_checks.yml @@ -0,0 +1,36 @@ +--- +name: type checking + +# runs type checks on several pythons as some errors may only show up on older versions + +on: + pull_request: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + typecheck: + + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install neurodocker + run: python -m pip install . mypy + + - name: Check types + run: mypy --install-types --non-interactive neurodocker diff --git a/.github/workflows/update_precommit_hooks.yml b/.github/workflows/update_precommit_hooks.yml new file mode 100644 index 00000000..658eb2af --- /dev/null +++ b/.github/workflows/update_precommit_hooks.yml @@ -0,0 +1,53 @@ +--- +name: Update precommit hooks + + +on: + +# Uses the cron schedule for github actions +# +# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#scheduled-events +# +# ┌───────────── minute (0 - 59) +# │ ┌───────────── hour (0 - 23) +# │ │ ┌───────────── day of the month (1 - 31) +# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) +# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) +# │ │ │ │ │ +# │ │ │ │ │ +# │ │ │ │ │ +# * * * * * + schedule: + - cron: 0 0 * * 1 # every monday + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + update_precommit_hooks: + + # only run on upstream repo + if: github.repository_owner == 'ReproNim' + + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + allow-prereleases: false + - name: Install pre-commit + run: pip install pre-commit + - name: Update pre-commit hooks + run: pre-commit autoupdate + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: pre-commit hooks auto-update + base: main + token: ${{ secrets.GITHUB_TOKEN }} + delete-branch: true + title: '[BOT] update pre-commit hooks' + body: done via this [GitHub Action](https://github.com/${{ github.repository_owner }}/neurodocker/blob/master/.github/workflows/update_precommit_hooks.yml) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml deleted file mode 100644 index e44bf09b..00000000 --- a/.github/workflows/validate.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: linters, formatters and type checking - -on: - pull_request: - branches: [ master ] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - format: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - - name: Install neurodocker - run: python -m pip install --editable .[dev] - - - name: Check style - run: flake8 neurodocker - - - name: Check black formatting - run: black --check neurodocker - - - name: Run isort - run: isort --diff --check --settings-path pyproject.toml . - - typecheck: - - runs-on: ubuntu-latest - - strategy: - matrix: - python-version: ['3.12', '3.11', '3.10', '3.9', '3.8'] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install neurodocker - run: python -m pip install --editable .[dev] - - - name: Check types - run: mypy --install-types --non-interactive neurodocker diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e9bab3b9..b8b17d72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,39 +1,60 @@ +--- # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files + - id: check-ast + - id: check-case-conflict + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: end-of-file-fixer + - id: mixed-line-ending -- repo: https://github.com/psf/black - rev: "23.1.0" +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 hooks: - - id: black + - id: codespell + additional_dependencies: + - tomli - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort args: [--profile, black] +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.3.0 + hooks: + - id: black + +- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + args: [--mapping, '4', --sequence, '4', --offset, '0'] + +- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks + rev: v2.13.0 + hooks: + - id: pretty-format-toml + args: [--autofix, --indent, '4'] + - repo: https://github.com/pycqa/flake8 - rev: "6.0.0" + rev: 7.0.0 hooks: - - id: flake8 + - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.991" + rev: v1.9.0 hooks: - - id: mypy + - id: mypy additional_dependencies: [types-all] files: neurodocker - args: ["--config-file", "setup.cfg"] - -- repo: https://github.com/codespell-project/codespell - rev: v2.2.5 - hooks: - - id: codespell + args: [--config-file, pyproject.toml, --install-types] diff --git a/docs/list_softwares.py b/docs/list_softwares.py index 0b0d5efd..936f0fdf 100644 --- a/docs/list_softwares.py +++ b/docs/list_softwares.py @@ -2,6 +2,7 @@ Read them from the registered yml templates. """ + from pathlib import Path from neurodocker.reproenv.state import registered_templates_items diff --git a/neurodocker/cli/minify/_prune.py b/neurodocker/cli/minify/_prune.py index 533eebc7..7c06c424 100644 --- a/neurodocker/cli/minify/_prune.py +++ b/neurodocker/cli/minify/_prune.py @@ -1,4 +1,5 @@ """Remove all files under a directory but not caught by `reprozip trace`.""" + from __future__ import annotations from pathlib import Path diff --git a/neurodocker/cli/tests/sample-template-jq.yaml b/neurodocker/cli/tests/sample-template-jq.yaml index 29c3808b..25a89ccc 100644 --- a/neurodocker/cli/tests/sample-template-jq.yaml +++ b/neurodocker/cli/tests/sample-template-jq.yaml @@ -1,59 +1,60 @@ +--- # Sample template. Installs `jq` from binaries or from source. name: jq -url: "some-url" +url: some-url binaries: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - yum: - - curl - env: - ND_BAZ: '1234' - ND_FOO: BAR - instructions: | - {{ self.install_dependencies() }} - curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} - chmod +x /usr/local/bin/jq - urls: - '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 - '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + yum: + - curl + env: + ND_BAZ: '1234' + ND_FOO: BAR + instructions: | + {{ self.install_dependencies() }} + curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} + chmod +x /usr/local/bin/jq + urls: + '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 + '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 source: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - yum: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - env: - ND_BAZ: '1234' - ND_FOO: BAR - instructions: | - {{ self.install_dependencies() }} - mkdir jq - cd jq - curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ - | tar xz --strip-components 1 - # Only required in version 1.6 - autoreconf -fi - ./configure --disable-maintainer-mode - make - make install + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + yum: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + env: + ND_BAZ: '1234' + ND_FOO: BAR + instructions: | + {{ self.install_dependencies() }} + mkdir jq + cd jq + curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ + | tar xz --strip-components 1 + # Only required in version 1.6 + autoreconf -fi + ./configure --disable-maintainer-mode + make + make install diff --git a/neurodocker/reproenv/schemas/renderer.json b/neurodocker/reproenv/schemas/renderer.json index a9b1ba23..169fa1f9 100644 --- a/neurodocker/reproenv/schemas/renderer.json +++ b/neurodocker/reproenv/schemas/renderer.json @@ -428,4 +428,4 @@ "additionalProperties": false } } -} \ No newline at end of file +} diff --git a/neurodocker/reproenv/state.py b/neurodocker/reproenv/state.py index 6601c068..310d2b01 100644 --- a/neurodocker/reproenv/state.py +++ b/neurodocker/reproenv/state.py @@ -1,4 +1,5 @@ """Stateful objects in reproenv runtime.""" + from __future__ import annotations import copy diff --git a/neurodocker/reproenv/tests/sample-template-jq.yaml b/neurodocker/reproenv/tests/sample-template-jq.yaml index 0f5bac02..629ab469 100644 --- a/neurodocker/reproenv/tests/sample-template-jq.yaml +++ b/neurodocker/reproenv/tests/sample-template-jq.yaml @@ -1,63 +1,64 @@ +--- # Sample template. Installs `jq` from binaries or from source. name: jq -url: "some-url" +url: some-url binaries: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - debs: + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + debs: # Not required for jq -- used to test if packackages are installed properly with dpkg. - - http://ftp.us.debian.org/debian/pool/main/r/rust-fd-find/fd-find_7.2.0-2_amd64.deb - yum: - - curl - - fd-find - env: - ND_BAZ: '1234' - ND_FOO: BAR - instructions: | - {{ self.install_dependencies() }} - curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} - chmod +x /usr/local/bin/jq - urls: - '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 - '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 + - http://ftp.us.debian.org/debian/pool/main/r/rust-fd-find/fd-find_7.2.0-2_amd64.deb + yum: + - curl + - fd-find + env: + ND_BAZ: '1234' + ND_FOO: BAR + instructions: | + {{ self.install_dependencies() }} + curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} + chmod +x /usr/local/bin/jq + urls: + '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 + '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 source: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - yum: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - env: - ND_BAZ: '1234' - ND_FOO: BAR - instructions: | - {{ self.install_dependencies() }} - mkdir jq - cd jq - curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ - | tar xz --strip-components 1 - # Only required in version 1.6 - autoreconf -fi - ./configure --disable-maintainer-mode - make - make install + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + yum: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + env: + ND_BAZ: '1234' + ND_FOO: BAR + instructions: | + {{ self.install_dependencies() }} + mkdir jq + cd jq + curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ + | tar xz --strip-components 1 + # Only required in version 1.6 + autoreconf -fi + ./configure --disable-maintainer-mode + make + make install diff --git a/neurodocker/reproenv/types.py b/neurodocker/reproenv/types.py index d74e5954..31f61e6d 100644 --- a/neurodocker/reproenv/types.py +++ b/neurodocker/reproenv/types.py @@ -1,4 +1,5 @@ """Define types used in ReproEnv.""" + from __future__ import annotations from typing import Mapping diff --git a/neurodocker/templates/_header.yaml b/neurodocker/templates/_header.yaml index 9f0e293b..6a09a4bb 100644 --- a/neurodocker/templates/_header.yaml +++ b/neurodocker/templates/_header.yaml @@ -1,47 +1,48 @@ +--- # Instructions to be run in the beginning of every Dockerfile generated by # Neurodocker. # TODO: read this about locales http://jaredmarkell.com/docker-and-locales/ name: _header -url: "n/a" +url: n/a # Not actually source, but we do not want to provide URLs. source: - dependencies: - apt: - - apt-utils - - bzip2 - - ca-certificates - - curl - - locales - - unzip - yum: - - bzip2 - - ca-certificates - - curl - - epel-release - - localedef - - unzip - env: - LANG: "en_US.UTF-8" - LC_ALL: "en_US.UTF-8" - ND_ENTRYPOINT: "/neurodocker/startup.sh" - instructions: | - export ND_ENTRYPOINT="{{ _header._env['ND_ENTRYPOINT'] }}" - {{ _header.install_dependencies() }} - {%- if _header.pkg_manager == "apt" %} - sed -i -e 's/# {{ _header._env['LC_ALL'] }} UTF-8/{{ _header._env['LC_ALL'] }} UTF-8/' /etc/locale.gen - dpkg-reconfigure --frontend=noninteractive locales - update-locale LANG="{{ _header._env['LANG'] }}" - {%- elif _header.pkg_manager == "yum" %} - localedef -i {{ _header._env['LC_ALL'].split('.')[0] }} -f {{ _header._env['LC_ALL'].split('.')[1] }} {{ _header._env['LC_ALL'] }} - {%- endif %} - chmod 777 /opt && chmod a+s /opt - mkdir -p /neurodocker - if [ ! -f "$ND_ENTRYPOINT" ]; then - echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" - echo 'set -e' >> "$ND_ENTRYPOINT" - echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" - echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; - fi - chmod -R 777 /neurodocker && chmod a+s /neurodocker + dependencies: + apt: + - apt-utils + - bzip2 + - ca-certificates + - curl + - locales + - unzip + yum: + - bzip2 + - ca-certificates + - curl + - epel-release + - localedef + - unzip + env: + LANG: en_US.UTF-8 + LC_ALL: en_US.UTF-8 + ND_ENTRYPOINT: /neurodocker/startup.sh + instructions: | + export ND_ENTRYPOINT="{{ _header._env['ND_ENTRYPOINT'] }}" + {{ _header.install_dependencies() }} + {%- if _header.pkg_manager == "apt" %} + sed -i -e 's/# {{ _header._env['LC_ALL'] }} UTF-8/{{ _header._env['LC_ALL'] }} UTF-8/' /etc/locale.gen + dpkg-reconfigure --frontend=noninteractive locales + update-locale LANG="{{ _header._env['LANG'] }}" + {%- elif _header.pkg_manager == "yum" %} + localedef -i {{ _header._env['LC_ALL'].split('.')[0] }} -f {{ _header._env['LC_ALL'].split('.')[1] }} {{ _header._env['LC_ALL'] }} + {%- endif %} + chmod 777 /opt && chmod a+s /opt + mkdir -p /neurodocker + if [ ! -f "$ND_ENTRYPOINT" ]; then + echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" + echo 'set -e' >> "$ND_ENTRYPOINT" + echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" + echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; + fi + chmod -R 777 /neurodocker && chmod a+s /neurodocker diff --git a/neurodocker/templates/afni.yaml b/neurodocker/templates/afni.yaml index ef68e991..61247abe 100644 --- a/neurodocker/templates/afni.yaml +++ b/neurodocker/templates/afni.yaml @@ -1,3 +1,4 @@ +--- # Instructions to install AFNI. # TODO: consider updating the source instructions to use cmake. @@ -5,195 +6,195 @@ name: afni url: https://afni.nimh.nih.gov binaries: - arguments: - optional: - install_path: /opt/afni-{{ self.version }} - version: latest - install_r_pkgs: "false" - install_python3: "false" - urls: - latest: https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz - env: - PATH: "{{ self.install_path }}:$PATH" - AFNI_PLUGINPATH: "{{ self.install_path }}" - dependencies: - apt: - - ca-certificates - - cmake - - curl - - ed - - gsl-bin - - libcurl4-openssl-dev - - libgl1-mesa-dri - - libjpeg-turbo8-dev - - libglu1-mesa-dev - - libglib2.0-0 - - libglw1-mesa - - libgomp1 - - libjpeg62 - - libssl-dev - - libudunits2-dev - - libxm4 - - multiarch-support - - netpbm - - python-is-python3 - - python3-pip - - tcsh - - xfonts-base - - xvfb - yum: - - cmake - - curl - - ed - - gsl - - libcurl-devel - - libGLU - - libgomp - - libjpeg-turbo-devel - - libpng12 - - libXp - - libXpm - - mesa-dri-drivers - - netpbm-progs - - openmotif - - openssl-devel - - python-is-python3 - - python3-pip - - R - - tcsh - - udunits2-devel - - which - - xorg-x11-fonts-misc - - xorg-x11-server-Xvfb - - wget - - mesa-dri-drivers - - mesa-libGLw - - which - - unzip - - ncurses-compat-libs - debs: - - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb - - http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb - instructions: | - {{ self.install_dependencies() }} - {% if self.install_python3.lower() in ["true", "1", "y"] -%} - {{ self.install(["python3"]) }} - pip3 install matplotlib - {%- endif %} - gsl_path="$(find / -name 'libgsl.so.??' || printf '')" - if [ -n "$gsl_path" ]; then \ - ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0"; \ - fi - ldconfig - mkdir -p {{ self.install_path }} - echo "Downloading AFNI ..." - curl -fL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --strip-components 1 - {%- if self.install_r_pkgs.lower() in ["true", "1", "y"] %} - {%- if self.pkg_manager == "apt" %} - {{ self.install(["r-base", "r-base-dev", "libnlopt-dev"]) }} - {% elif self.pkg_manager == "yum" %} - {{ self.install(["R-devel"]) }} - {% endif -%} - rPkgsInstall -pkgs ALL - {% endif -%} + arguments: + optional: + install_path: /opt/afni-{{ self.version }} + version: latest + install_r_pkgs: 'false' + install_python3: 'false' + urls: + latest: https://afni.nimh.nih.gov/pub/dist/tgz/linux_openmp_64.tgz + env: + PATH: '{{ self.install_path }}:$PATH' + AFNI_PLUGINPATH: '{{ self.install_path }}' + dependencies: + apt: + - ca-certificates + - cmake + - curl + - ed + - gsl-bin + - libcurl4-openssl-dev + - libgl1-mesa-dri + - libjpeg-turbo8-dev + - libglu1-mesa-dev + - libglib2.0-0 + - libglw1-mesa + - libgomp1 + - libjpeg62 + - libssl-dev + - libudunits2-dev + - libxm4 + - multiarch-support + - netpbm + - python-is-python3 + - python3-pip + - tcsh + - xfonts-base + - xvfb + yum: + - cmake + - curl + - ed + - gsl + - libcurl-devel + - libGLU + - libgomp + - libjpeg-turbo-devel + - libpng12 + - libXp + - libXpm + - mesa-dri-drivers + - netpbm-progs + - openmotif + - openssl-devel + - python-is-python3 + - python3-pip + - R + - tcsh + - udunits2-devel + - which + - xorg-x11-fonts-misc + - xorg-x11-server-Xvfb + - wget + - mesa-dri-drivers + - mesa-libGLw + - which + - unzip + - ncurses-compat-libs + debs: + - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb + - http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb + instructions: | + {{ self.install_dependencies() }} + {% if self.install_python3.lower() in ["true", "1", "y"] -%} + {{ self.install(["python3"]) }} + pip3 install matplotlib + {%- endif %} + gsl_path="$(find / -name 'libgsl.so.??' || printf '')" + if [ -n "$gsl_path" ]; then \ + ln -sfv "$gsl_path" "$(dirname $gsl_path)/libgsl.so.0"; \ + fi + ldconfig + mkdir -p {{ self.install_path }} + echo "Downloading AFNI ..." + curl -fL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --strip-components 1 + {%- if self.install_r_pkgs.lower() in ["true", "1", "y"] %} + {%- if self.pkg_manager == "apt" %} + {{ self.install(["r-base", "r-base-dev", "libnlopt-dev"]) }} + {% elif self.pkg_manager == "yum" %} + {{ self.install(["R-devel"]) }} + {% endif -%} + rPkgsInstall -pkgs ALL + {% endif -%} source: - arguments: - required: - - version - optional: - repo: https://github.com/afni/afni.git - install_path: /opt/afni-{{ self.version }} - install_r_pkgs: "false" - install_python3: "false" - env: - PATH: "{{ self.install_path }}:$PATH" - AFNI_PLUGINPATH: "{{ self.install_path }}" - dependencies: - apt: - - ca-certificates - - curl - - ed - - g++ - - gcc - - git - - libgl1-mesa-dri - - libglib2.0-dev - - libglu1-mesa-dev - - libgsl-dev - - libmotif-dev - - libnetpbm10-dev - - libxext-dev - - libxi-dev - - libxmu-headers - - libxpm-dev - - libxt-dev - - m4 - - make - - mesa-common-dev - - multiarch-support - - tcsh - - zlib1g-dev - yum: - - compat-gcc-34 - - curl - - expat-devel - - gcc - - gcc-c++ - - gcc-gfortran - - git - - glib2-devel - - gsl-devel - - libXext-devel - - libXi-devel - - libXmu-devel - - libXpm-devel - - libXt-devel - - m4 - - make - - mesa-dri-drivers - - mesa-libGL-devel - - mesa-libGLU-devel - - netpbm-devel - - openmotif-devel - - R - - tcsh - - which - - zlib-devel - debs: - - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb - - http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb - instructions: | - {{ self.install_dependencies() }} - {%- if self.install_python3.lower() in ["true", "1", "y"] %} - {{ self.install(["python3"]) }}{% endif %} - git clone {{ self.repo }} {{ self.install_path }} - cd {{ self.install_path }} - {% if self.version != "master" and self.version != "latest" -%} - git fetch --tags - git checkout {{ self.version }} - {% endif -%} - cd src - cp Makefile.linux_openmp_64 Makefile - perl -p -i -e 's/^LGIFTI.*/LGIFTI = -lexpat/' Makefile - perl -p -i -e 's/^USE_LOCAL_X_TREE/#USE_LOCAL_X_TREE/' Makefile - perl -p -i -e 's/XLIBS = \$\(XROOT\)\/lib64\/libXm.a -lXt/XLIBS = \$\(XROOT\)\/lib64\/libXm.a \$\(XROOT\)\/lib\/x86_64-linux-gnu\/libXm.a -lXt/' Makefile - perl -p -i -e 's/^# XLIBS =/XLIBS =/' Makefile - perl -p -i -e 's/^CCOLD.*/CCOLD = \$\(CC\)/' Makefile - perl -p -i -e 's/(^LFLAGS.*)/$1 -L\/usr\/lib\/x86_64-linux-gnu/' Makefile - perl -p -i -e 's/(^PLFLAGS.*)/$1 -L\/usr\/lib -L\/usr\/lib\/x86_64-linux-gnu/' Makefile - perl -p -i -e 's/-lXpm -lXext/-lXpm -lfontconfig -lXext/' Makefile - perl -p -i -e 's/(^SUMA_INCLUDE_PATH.*)/$1 -I\/usr\/lib\/x86_64-linux-gnu\/glib-2.0\/include/' Makefile - # If we do not symlink, gcc complains that it cannot find these libraries. - ln -s /usr/lib/x86_64-linux-gnu/libXmu.so.6 /usr/lib/x86_64-linux-gnu/libXmu.so - ln -s /usr/lib/x86_64-linux-gnu/libXp.so.6 /usr/lib/x86_64-linux-gnu/libXp.so - make INSTALLDIR="{{ self.install_path }}" vastness - {%- if self.install_r_pkgs.lower() in ["true", "1", "y"] %} - {%- if self.pkg_manager == "apt" %} - {{ self.install(["r-base", "r-base-dev", "libnlopt-dev"]) }} - {% elif self.pkg_manager == "yum" %} - {{ self.install(["R-devel"]) }} - {% endif -%} - rPkgsInstall -pkgs ALL - {% endif -%} + arguments: + required: + - version + optional: + repo: https://github.com/afni/afni.git + install_path: /opt/afni-{{ self.version }} + install_r_pkgs: 'false' + install_python3: 'false' + env: + PATH: '{{ self.install_path }}:$PATH' + AFNI_PLUGINPATH: '{{ self.install_path }}' + dependencies: + apt: + - ca-certificates + - curl + - ed + - g++ + - gcc + - git + - libgl1-mesa-dri + - libglib2.0-dev + - libglu1-mesa-dev + - libgsl-dev + - libmotif-dev + - libnetpbm10-dev + - libxext-dev + - libxi-dev + - libxmu-headers + - libxpm-dev + - libxt-dev + - m4 + - make + - mesa-common-dev + - multiarch-support + - tcsh + - zlib1g-dev + yum: + - compat-gcc-34 + - curl + - expat-devel + - gcc + - gcc-c++ + - gcc-gfortran + - git + - glib2-devel + - gsl-devel + - libXext-devel + - libXi-devel + - libXmu-devel + - libXpm-devel + - libXt-devel + - m4 + - make + - mesa-dri-drivers + - mesa-libGL-devel + - mesa-libGLU-devel + - netpbm-devel + - openmotif-devel + - R + - tcsh + - which + - zlib-devel + debs: + - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb + - http://snapshot.debian.org/archive/debian-security/20160113T213056Z/pool/updates/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb + instructions: | + {{ self.install_dependencies() }} + {%- if self.install_python3.lower() in ["true", "1", "y"] %} + {{ self.install(["python3"]) }}{% endif %} + git clone {{ self.repo }} {{ self.install_path }} + cd {{ self.install_path }} + {% if self.version != "master" and self.version != "latest" -%} + git fetch --tags + git checkout {{ self.version }} + {% endif -%} + cd src + cp Makefile.linux_openmp_64 Makefile + perl -p -i -e 's/^LGIFTI.*/LGIFTI = -lexpat/' Makefile + perl -p -i -e 's/^USE_LOCAL_X_TREE/#USE_LOCAL_X_TREE/' Makefile + perl -p -i -e 's/XLIBS = \$\(XROOT\)\/lib64\/libXm.a -lXt/XLIBS = \$\(XROOT\)\/lib64\/libXm.a \$\(XROOT\)\/lib\/x86_64-linux-gnu\/libXm.a -lXt/' Makefile + perl -p -i -e 's/^# XLIBS =/XLIBS =/' Makefile + perl -p -i -e 's/^CCOLD.*/CCOLD = \$\(CC\)/' Makefile + perl -p -i -e 's/(^LFLAGS.*)/$1 -L\/usr\/lib\/x86_64-linux-gnu/' Makefile + perl -p -i -e 's/(^PLFLAGS.*)/$1 -L\/usr\/lib -L\/usr\/lib\/x86_64-linux-gnu/' Makefile + perl -p -i -e 's/-lXpm -lXext/-lXpm -lfontconfig -lXext/' Makefile + perl -p -i -e 's/(^SUMA_INCLUDE_PATH.*)/$1 -I\/usr\/lib\/x86_64-linux-gnu\/glib-2.0\/include/' Makefile + # If we do not symlink, gcc complains that it cannot find these libraries. + ln -s /usr/lib/x86_64-linux-gnu/libXmu.so.6 /usr/lib/x86_64-linux-gnu/libXmu.so + ln -s /usr/lib/x86_64-linux-gnu/libXp.so.6 /usr/lib/x86_64-linux-gnu/libXp.so + make INSTALLDIR="{{ self.install_path }}" vastness + {%- if self.install_r_pkgs.lower() in ["true", "1", "y"] %} + {%- if self.pkg_manager == "apt" %} + {{ self.install(["r-base", "r-base-dev", "libnlopt-dev"]) }} + {% elif self.pkg_manager == "yum" %} + {{ self.install(["R-devel"]) }} + {% endif -%} + rPkgsInstall -pkgs ALL + {% endif -%} diff --git a/neurodocker/templates/ants.yaml b/neurodocker/templates/ants.yaml index 5bfb15b4..a73fc0a0 100644 --- a/neurodocker/templates/ants.yaml +++ b/neurodocker/templates/ants.yaml @@ -1,101 +1,102 @@ +--- # Instructions to install ANTs (https://github.com/ANTsX/ANTs) name: ants url: http://stnava.github.io/ANTs/ binaries: - arguments: - required: - - version - optional: - install_path: /opt/ants-{{ self.version }} - urls: + arguments: + required: + - version + optional: + install_path: /opt/ants-{{ self.version }} + urls: # Official binaries are provided as of 2.4.1 (https://github.com/ANTsX/ANTs/releases) - "2.4.3": https://github.com/ANTsX/ANTs/releases/download/v2.4.3/ants-2.4.3-centos7-X64-gcc.zip - "2.4.2": https://github.com/ANTsX/ANTs/releases/download/v2.4.2/ants-2.4.2-centos7-X64-gcc.zip - "2.4.1": https://github.com/ANTsX/ANTs/releases/download/v2.4.1/ants-2.4.1-centos7-X64-gcc.zip + 2.4.3: https://github.com/ANTsX/ANTs/releases/download/v2.4.3/ants-2.4.3-centos7-X64-gcc.zip + 2.4.2: https://github.com/ANTsX/ANTs/releases/download/v2.4.2/ants-2.4.2-centos7-X64-gcc.zip + 2.4.1: https://github.com/ANTsX/ANTs/releases/download/v2.4.1/ants-2.4.1-centos7-X64-gcc.zip # Binaries prior to 2.4.x were compiled by Jakub Kaczmarzyk (https://github.com/kaczmarj) - "2.3.4": https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz - "2.3.2": https://dl.dropbox.com/s/hrm530kcqe3zo68/ants-Linux-centos6_x86_64-v2.3.2.tar.gz - "2.3.1": https://dl.dropbox.com/s/1xfhydsf4t4qoxg/ants-Linux-centos6_x86_64-v2.3.1.tar.gz - "2.3.0": https://dl.dropbox.com/s/b3iymb9ml36ecp9/ants-Linux-centos6_x86_64-v2.3.0.tar.gz - "2.2.0": https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz - "2.1.0": https://dl.dropbox.com/s/h8k4v6d1xrv0wbe/ANTs-Linux-centos5_x86_64-v2.1.0-78931aa.tar.gz - "2.0.3": https://dl.dropbox.com/s/oe4v52lveyt1ry9/ANTs-Linux-centos5_x86_64-v2.0.3-c996539.tar.gz - "2.0.0": https://dl.dropbox.com/s/kgqydc44cc2uigb/ANTs-Linux-centos5_x86_64-v2.0.0-7ae1107.tar.gz - dependencies: - apt: - - ca-certificates - - curl - - unzip - yum: - - curl - - unzip - env: - ANTSPATH: "{{ self.install_path }}/" - PATH: "{{ self.install_path }}:$PATH" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading ANTs ..." - {% if (self.version == "2.4.1" or self.version == "2.4.2" or self.version == "2.4.3") -%} - curl -fsSL -o ants.zip {{ self.urls[self.version] }} - unzip ants.zip -d /opt - mv {{ self.install_path }}/bin/* {{ self.install_path }} - rm ants.zip - {% elif self.version != "2.4.1" -%} - mkdir -p {{ self.install_path }} - curl -fsSL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --strip-components 1 - {% endif -%} + 2.3.4: https://dl.dropbox.com/s/gwf51ykkk5bifyj/ants-Linux-centos6_x86_64-v2.3.4.tar.gz + 2.3.2: https://dl.dropbox.com/s/hrm530kcqe3zo68/ants-Linux-centos6_x86_64-v2.3.2.tar.gz + 2.3.1: https://dl.dropbox.com/s/1xfhydsf4t4qoxg/ants-Linux-centos6_x86_64-v2.3.1.tar.gz + 2.3.0: https://dl.dropbox.com/s/b3iymb9ml36ecp9/ants-Linux-centos6_x86_64-v2.3.0.tar.gz + 2.2.0: https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz + 2.1.0: https://dl.dropbox.com/s/h8k4v6d1xrv0wbe/ANTs-Linux-centos5_x86_64-v2.1.0-78931aa.tar.gz + 2.0.3: https://dl.dropbox.com/s/oe4v52lveyt1ry9/ANTs-Linux-centos5_x86_64-v2.0.3-c996539.tar.gz + 2.0.0: https://dl.dropbox.com/s/kgqydc44cc2uigb/ANTs-Linux-centos5_x86_64-v2.0.0-7ae1107.tar.gz + dependencies: + apt: + - ca-certificates + - curl + - unzip + yum: + - curl + - unzip + env: + ANTSPATH: '{{ self.install_path }}/' + PATH: '{{ self.install_path }}:$PATH' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading ANTs ..." + {% if (self.version == "2.4.1" or self.version == "2.4.2" or self.version == "2.4.3") -%} + curl -fsSL -o ants.zip {{ self.urls[self.version] }} + unzip ants.zip -d /opt + mv {{ self.install_path }}/bin/* {{ self.install_path }} + rm ants.zip + {% elif self.version != "2.4.1" -%} + mkdir -p {{ self.install_path }} + curl -fsSL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --strip-components 1 + {% endif -%} source: - arguments: - required: - - version - optional: - repo: https://github.com/ANTsX/ANTs.git - install_path: /opt/ants-{{ self.version }} - cmake_opts: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF - make_opts: -j1 - dependencies: - apt: - - ca-certificates - - cmake - - g++ - - gcc - - git - - make - - zlib1g-dev - yum: - - ca-certificates - - cmake - - gcc-c++ - - git - - make - - zlib-devel - env: - ANTSPATH: "{{ self.install_path }}/bin" - PATH: "{{ self.install_path }}/bin:{{ self.install_path }}/Scripts:$PATH" - LD_LIBRARY_PATH: "{{ self.install_path }}/lib:$LD_LIBRARY_PATH" - instructions: | - {{ self.install_dependencies() }} - mkdir -p /tmp/ants/build - git clone {{ self.repo }} /tmp/ants/source - {% if self.version != "master" and self.version != "latest" -%} - cd /tmp/ants/source - git fetch --tags - git -c advice.detachedHead=false checkout v{{ self.version }} - {% endif -%} - cd /tmp/ants/build - cmake {{ self.cmake_opts }} /tmp/ants/source - make {{ self.make_opts }} - mkdir -p {{ self.install_path }} - # Recent versions of ants create ANTS-build. - if [ -d ANTS-build ]; then \ - cd ANTS-build \ - && make install \ - && mv ../../source/Scripts/ {{ self.install_path }}; \ - else \ - mv bin lib {{ self.install_path }}/ \ - mv ../Scripts/* {{ self.install_path }} ; \ - fi - rm -rf /tmp/ants + arguments: + required: + - version + optional: + repo: https://github.com/ANTsX/ANTs.git + install_path: /opt/ants-{{ self.version }} + cmake_opts: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF + make_opts: -j1 + dependencies: + apt: + - ca-certificates + - cmake + - g++ + - gcc + - git + - make + - zlib1g-dev + yum: + - ca-certificates + - cmake + - gcc-c++ + - git + - make + - zlib-devel + env: + ANTSPATH: '{{ self.install_path }}/bin' + PATH: '{{ self.install_path }}/bin:{{ self.install_path }}/Scripts:$PATH' + LD_LIBRARY_PATH: '{{ self.install_path }}/lib:$LD_LIBRARY_PATH' + instructions: | + {{ self.install_dependencies() }} + mkdir -p /tmp/ants/build + git clone {{ self.repo }} /tmp/ants/source + {% if self.version != "master" and self.version != "latest" -%} + cd /tmp/ants/source + git fetch --tags + git -c advice.detachedHead=false checkout v{{ self.version }} + {% endif -%} + cd /tmp/ants/build + cmake {{ self.cmake_opts }} /tmp/ants/source + make {{ self.make_opts }} + mkdir -p {{ self.install_path }} + # Recent versions of ants create ANTS-build. + if [ -d ANTS-build ]; then \ + cd ANTS-build \ + && make install \ + && mv ../../source/Scripts/ {{ self.install_path }}; \ + else \ + mv bin lib {{ self.install_path }}/ \ + mv ../Scripts/* {{ self.install_path }} ; \ + fi + rm -rf /tmp/ants diff --git a/neurodocker/templates/bids_validator.yaml b/neurodocker/templates/bids_validator.yaml index a8c5f1e2..71ae89a3 100644 --- a/neurodocker/templates/bids_validator.yaml +++ b/neurodocker/templates/bids_validator.yaml @@ -1,43 +1,44 @@ +--- name: bids_validator url: https://github.com/bids-standard/bids-validator binaries: - urls: - "1.13.0": "https://github.com/bids-standard/bids-validator/releases/tag/v1.13.0" - "1.12.0": "https://github.com/bids-standard/bids-validator/releases/tag/v1.12.0" - "1.11.0": "https://github.com/bids-standard/bids-validator/releases/tag/v1.11.0" - "1.10.0": "https://github.com/bids-standard/bids-validator/releases/tag/v1.10.0" - "1.9.0": "https://github.com/bids-standard/bids-validator/releases/tag/v1.10.0" - arguments: - required: - - version - optional: - node_version: "20" - dependencies: - apt: - - ca-certificates - - curl - - apt-utils - - gnupg - yum: - - curl + urls: + 1.13.0: https://github.com/bids-standard/bids-validator/releases/tag/v1.13.0 + 1.12.0: https://github.com/bids-standard/bids-validator/releases/tag/v1.12.0 + 1.11.0: https://github.com/bids-standard/bids-validator/releases/tag/v1.11.0 + 1.10.0: https://github.com/bids-standard/bids-validator/releases/tag/v1.10.0 + 1.9.0: https://github.com/bids-standard/bids-validator/releases/tag/v1.10.0 + arguments: + required: + - version + optional: + node_version: '20' + dependencies: + apt: + - ca-certificates + - curl + - apt-utils + - gnupg + yum: + - curl # see install for node https://github.com/nodesource/distributions#installation-scripts - instructions: | - if [ ! -z `which node` ] ; then \ - echo "node is installed, skipping its install." ; \ - else \ - {{ self.install_dependencies() }} - {%- if self.pkg_manager == "apt" %} - curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh - chmod 500 nsolid_setup_deb.sh - ./nsolid_setup_deb.sh {{ self.node_version }} - {{ self.install(["nodejs"]) }} ; \ - {% elif self.pkg_manager == "yum" %} - curl -SLO https://rpm.nodesource.com/nsolid_setup_rpm.sh - chmod 500 nsolid_setup_rpm.sh - ./nsolid_setup_rpm.sh {{ self.node_version }} - {{ self.install(["nodejs --setopt=nodesource-nodejs.module_hotfixes=1"]) }} ; \ - {% endif -%} - fi - node --version - npm --version - npm install -g bids-validator@{{ self.version }} + instructions: | + if [ ! -z `which node` ] ; then \ + echo "node is installed, skipping its install." ; \ + else \ + {{ self.install_dependencies() }} + {%- if self.pkg_manager == "apt" %} + curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh + chmod 500 nsolid_setup_deb.sh + ./nsolid_setup_deb.sh {{ self.node_version }} + {{ self.install(["nodejs"]) }} ; \ + {% elif self.pkg_manager == "yum" %} + curl -SLO https://rpm.nodesource.com/nsolid_setup_rpm.sh + chmod 500 nsolid_setup_rpm.sh + ./nsolid_setup_rpm.sh {{ self.node_version }} + {{ self.install(["nodejs --setopt=nodesource-nodejs.module_hotfixes=1"]) }} ; \ + {% endif -%} + fi + node --version + npm --version + npm install -g bids-validator@{{ self.version }} diff --git a/neurodocker/templates/cat12.yaml b/neurodocker/templates/cat12.yaml index cc883bb2..b2e1e98b 100644 --- a/neurodocker/templates/cat12.yaml +++ b/neurodocker/templates/cat12.yaml @@ -1,3 +1,4 @@ +--- # Instructions to install CAT12 toolbox with SPM. # # Documentation: http://www.neuro.uni-jena.de/cat12-html/cat_versions.html @@ -6,41 +7,41 @@ name: cat12 url: https://neuro-jena.github.io/cat/ binaries: - arguments: - required: - - version - optional: - install_path: /opt/CAT12-{{ self.version }} - urls: - r1933_R2017b: http://www.neuro.uni-jena.de/cat12/CAT12.8_r1933_R2017b_MCR_Linux.zip - r2166_R2017b: http://www.neuro.uni-jena.de/cat12/CAT12.8.2_r2166_R2017b_MCR_Linux.zip - dependencies: - apt: - - ca-certificates - - curl - - unzip - yum: - - curl - - unzip - env: - FORCE_SPMMCR: "1" - SPM_HTML_BROWSER: "0" - MCR_INHIBIT_CTF_LOCK: "1" - SPMROOT: "{{ self.install_path }}" - PATH: "{{ self.install_path }}:$PATH" + arguments: + required: + - version + optional: + install_path: /opt/CAT12-{{ self.version }} + urls: + r1933_R2017b: http://www.neuro.uni-jena.de/cat12/CAT12.8_r1933_R2017b_MCR_Linux.zip + r2166_R2017b: http://www.neuro.uni-jena.de/cat12/CAT12.8.2_r2166_R2017b_MCR_Linux.zip + dependencies: + apt: + - ca-certificates + - curl + - unzip + yum: + - curl + - unzip + env: + FORCE_SPMMCR: '1' + SPM_HTML_BROWSER: '0' + MCR_INHIBIT_CTF_LOCK: '1' + SPMROOT: '{{ self.install_path }}' + PATH: '{{ self.install_path }}:$PATH' - instructions: | - {{ self.install_dependencies() }} - # Install cat12 - echo "Downloading standalone CAT12 ..." - curl -fL -o /tmp/cat12.zip {{ self.urls[self.version] }} - unzip -q /tmp/cat12.zip -d /tmp - rm -rf /tmp/cat12.zip - mkdir -p {{ self.install_path }} - mv /tmp/*{{ self.version }}*/* {{ self.install_path }}/ - chmod -R 777 {{ self.install_path }} - # Test - {{ self.install_path }}/spm12 function exit - # Fix m file - rm {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.m - cp {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.txt {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.m + instructions: | + {{ self.install_dependencies() }} + # Install cat12 + echo "Downloading standalone CAT12 ..." + curl -fL -o /tmp/cat12.zip {{ self.urls[self.version] }} + unzip -q /tmp/cat12.zip -d /tmp + rm -rf /tmp/cat12.zip + mkdir -p {{ self.install_path }} + mv /tmp/*{{ self.version }}*/* {{ self.install_path }}/ + chmod -R 777 {{ self.install_path }} + # Test + {{ self.install_path }}/spm12 function exit + # Fix m file + rm {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.m + cp {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.txt {{ self.install_path }}/spm12_mcr/home/gaser/gaser/spm/spm12/toolbox/cat12/cat_long_main.m diff --git a/neurodocker/templates/convert3d.yaml b/neurodocker/templates/convert3d.yaml index f02b1edb..637a40e0 100644 --- a/neurodocker/templates/convert3d.yaml +++ b/neurodocker/templates/convert3d.yaml @@ -1,28 +1,29 @@ +--- # Instructions to install Convert3D. name: convert3d url: http://www.itksnap.org/pmwiki/pmwiki.php?n=Convert3D.Convert3D binaries: - arguments: - required: - - version - optional: - install_path: /opt/convert3d-{{ self.version }} - dependencies: - apt: - - ca-certificates - - curl - yum: - - curl - urls: - nightly: https://sourceforge.net/projects/c3d/files/c3d/Nightly/c3d-nightly-Linux-x86_64.tar.gz/download - "1.0.0": https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download - env: - C3DPATH: "{{ self.install_path }}" - PATH: "{{ self.install_path }}/bin:$PATH" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading Convert3D ..." - mkdir -p {{ self.install_path }} - curl -fsSL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --strip-components 1 + arguments: + required: + - version + optional: + install_path: /opt/convert3d-{{ self.version }} + dependencies: + apt: + - ca-certificates + - curl + yum: + - curl + urls: + nightly: https://sourceforge.net/projects/c3d/files/c3d/Nightly/c3d-nightly-Linux-x86_64.tar.gz/download + 1.0.0: https://sourceforge.net/projects/c3d/files/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz/download + env: + C3DPATH: '{{ self.install_path }}' + PATH: '{{ self.install_path }}/bin:$PATH' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading Convert3D ..." + mkdir -p {{ self.install_path }} + curl -fsSL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --strip-components 1 diff --git a/neurodocker/templates/dcm2niix.yaml b/neurodocker/templates/dcm2niix.yaml index 7d05b319..436e2920 100644 --- a/neurodocker/templates/dcm2niix.yaml +++ b/neurodocker/templates/dcm2niix.yaml @@ -1,78 +1,79 @@ +--- # Instructions to install dcm2niix. name: dcm2niix url: https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage binaries: - arguments: - required: - - version - optional: - install_path: /opt/dcm2niix-{{ self.version }} - urls: - latest: https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_lnx.zip - v1.0.20201102: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20201102/dcm2niix_lnx.zip - v1.0.20200331: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20200331/dcm2niix_lnx.zip - v1.0.20190902: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20190902/dcm2niix_lnx.zip - dependencies: - apt: - - ca-certificates - - curl - - unzip - yum: - - curl - - unzip - env: - PATH: "{{ self.install_path }}:$PATH" - instructions: | - {{ self.install_dependencies() }} - mkdir -p {{ self.install_path }} - cd {{ self.install_path }} - curl -fsSL -o dcm2niix.zip {{ self.urls[self.version] }} - unzip dcm2niix.zip - rm dcm2niix.zip - chmod +x dcm2niix + arguments: + required: + - version + optional: + install_path: /opt/dcm2niix-{{ self.version }} + urls: + latest: https://github.com/rordenlab/dcm2niix/releases/latest/download/dcm2niix_lnx.zip + v1.0.20201102: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20201102/dcm2niix_lnx.zip + v1.0.20200331: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20200331/dcm2niix_lnx.zip + v1.0.20190902: https://github.com/rordenlab/dcm2niix/releases/download/v1.0.20190902/dcm2niix_lnx.zip + dependencies: + apt: + - ca-certificates + - curl + - unzip + yum: + - curl + - unzip + env: + PATH: '{{ self.install_path }}:$PATH' + instructions: | + {{ self.install_dependencies() }} + mkdir -p {{ self.install_path }} + cd {{ self.install_path }} + curl -fsSL -o dcm2niix.zip {{ self.urls[self.version] }} + unzip dcm2niix.zip + rm dcm2niix.zip + chmod +x dcm2niix source: - arguments: - required: - - version - optional: - repo: https://github.com/rordenlab/dcm2niix - install_path: /opt/dcm2niix-{{ self.version }} - cmake_opts: "" - make_opts: -j1 - dependencies: - apt: - - ca-certificates - - cmake - - g++ - - gcc - - git - - make - - pigz - - zlib1g-dev - yum: - - ca-certificates - - cmake - - gcc-c++ - - git - - libstdc++-static - - make - - pigz - - zlib-devel - env: - PATH: "{{ self.install_path }}/bin:$PATH" - instructions: | - {{ self.install_dependencies() }} - git clone {{ self.repo }} /tmp/dcm2niix - {% if self.version != "master" and self.version != "latest" -%} - cd /tmp/dcm2niix - git fetch --tags - git checkout {{ self.version }} - {% endif -%} - mkdir /tmp/dcm2niix/build - cd /tmp/dcm2niix/build - cmake {{ self.cmake_opts }} -DCMAKE_INSTALL_PREFIX:PATH={{ self.install_path }} .. - make {{ self.make_opts }} - make install - rm -rf /tmp/dcm2niix + arguments: + required: + - version + optional: + repo: https://github.com/rordenlab/dcm2niix + install_path: /opt/dcm2niix-{{ self.version }} + cmake_opts: '' + make_opts: -j1 + dependencies: + apt: + - ca-certificates + - cmake + - g++ + - gcc + - git + - make + - pigz + - zlib1g-dev + yum: + - ca-certificates + - cmake + - gcc-c++ + - git + - libstdc++-static + - make + - pigz + - zlib-devel + env: + PATH: '{{ self.install_path }}/bin:$PATH' + instructions: | + {{ self.install_dependencies() }} + git clone {{ self.repo }} /tmp/dcm2niix + {% if self.version != "master" and self.version != "latest" -%} + cd /tmp/dcm2niix + git fetch --tags + git checkout {{ self.version }} + {% endif -%} + mkdir /tmp/dcm2niix/build + cd /tmp/dcm2niix/build + cmake {{ self.cmake_opts }} -DCMAKE_INSTALL_PREFIX:PATH={{ self.install_path }} .. + make {{ self.make_opts }} + make install + rm -rf /tmp/dcm2niix diff --git a/neurodocker/templates/freesurfer.yaml b/neurodocker/templates/freesurfer.yaml index d076f543..9c2ee47b 100644 --- a/neurodocker/templates/freesurfer.yaml +++ b/neurodocker/templates/freesurfer.yaml @@ -1,94 +1,95 @@ +--- # Instructions to install FreeSurfer. name: freesurfer url: https://surfer.nmr.mgh.harvard.edu/ binaries: - arguments: - required: - - version - optional: - install_path: /opt/freesurfer-{{ self.version }} - exclude_paths: | - average/mult-comp-cor - lib/cuda - lib/qt - subjects/V1_average - subjects/bert - subjects/cvs_avg35 - subjects/cvs_avg35_inMNI152 - subjects/fsaverage3 - subjects/fsaverage4 - subjects/fsaverage5 - subjects/fsaverage6 - subjects/fsaverage_sym - trctrain - urls: - "7.4.1": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-centos7_x86_64-7.4.1.tar.gz - "7.3.2": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.2/freesurfer-linux-centos7_x86_64-7.3.2.tar.gz - "7.3.1": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.1/freesurfer-linux-centos7_x86_64-7.3.1.tar.gz - "7.3.0": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.0/freesurfer-linux-centos7_x86_64-7.3.0.tar.gz - "7.2.0": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.2.0/freesurfer-linux-centos6_x86_64-7.2.0.tar.gz - "7.1.1": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.1.1/freesurfer-linux-centos6_x86_64-7.1.1.tar.gz - "7.1.1-min": https://dl.dropbox.com/s/c3earkfhhvdyuo4/freesurfer-7.1.1-min.tgz - "7.1.0": https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.1.0/freesurfer-linux-centos6_x86_64-7.1.0.tar.gz + arguments: + required: + - version + optional: + install_path: /opt/freesurfer-{{ self.version }} + exclude_paths: | + average/mult-comp-cor + lib/cuda + lib/qt + subjects/V1_average + subjects/bert + subjects/cvs_avg35 + subjects/cvs_avg35_inMNI152 + subjects/fsaverage3 + subjects/fsaverage4 + subjects/fsaverage5 + subjects/fsaverage6 + subjects/fsaverage_sym + trctrain + urls: + 7.4.1: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.4.1/freesurfer-linux-centos7_x86_64-7.4.1.tar.gz + 7.3.2: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.2/freesurfer-linux-centos7_x86_64-7.3.2.tar.gz + 7.3.1: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.1/freesurfer-linux-centos7_x86_64-7.3.1.tar.gz + 7.3.0: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.3.0/freesurfer-linux-centos7_x86_64-7.3.0.tar.gz + 7.2.0: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.2.0/freesurfer-linux-centos6_x86_64-7.2.0.tar.gz + 7.1.1: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.1.1/freesurfer-linux-centos6_x86_64-7.1.1.tar.gz + 7.1.1-min: https://dl.dropbox.com/s/c3earkfhhvdyuo4/freesurfer-7.1.1-min.tgz + 7.1.0: https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.1.0/freesurfer-linux-centos6_x86_64-7.1.0.tar.gz # 7.0.0 not included because it was recalled several days after release due to a bug. Replaced by 7.1.0. # From FreeSurfer team: we recommend that people NOT use 7.0.0 and use 7.1.0 instead. - "6.0.1": ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz - "6.0.0": ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz + 6.0.1: ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.1/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1.tar.gz + 6.0.0: ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz # See https://github.com/freesurfer/freesurfer/issues/70 - "6.0.0-min": https://dl.dropbox.com/s/nnzcfttc41qvt31/recon-all-freesurfer6-3.min.tgz - dependencies: - apt: - - bc - - ca-certificates - - curl - - libgomp1 - - libxmu6 - - libxt6 - - tcsh - - perl - yum: - - bc - - curl - - libgomp - - libXmu - - libXt - - tcsh - - perl - env: + 6.0.0-min: https://dl.dropbox.com/s/nnzcfttc41qvt31/recon-all-freesurfer6-3.min.tgz + dependencies: + apt: + - bc + - ca-certificates + - curl + - libgomp1 + - libxmu6 + - libxt6 + - tcsh + - perl + yum: + - bc + - curl + - libgomp + - libXmu + - libXt + - tcsh + - perl + env: # From https://github.com/freesurfer/freesurfer/blob/54018f7d6f620d6288b28f50e14a0a4ba421757c/Dockerfile#L20-L42 # freesurfer env - OS: "Linux" - PATH: "{{ self.install_path }}/bin:{{ self.install_path }}/fsfast/bin:{{ self.install_path }}/tktools:{{ self.install_path }}/mni/bin:$PATH" - FREESURFER_HOME: "{{ self.install_path }}" - FREESURFER: "{{ self.install_path }}" - SUBJECTS_DIR: "{{ self.install_path }}/subjects" - LOCAL_DIR: "{{ self.install_path }}/local" - FSFAST_HOME: "{{ self.install_path }}/fsfast" - FMRI_ANALYSIS_DIR: "{{ self.install_path }}/fsfast" - FUNCTIONALS_DIR: "{{ self.install_path }}/sessions" + OS: Linux + PATH: '{{ self.install_path }}/bin:{{ self.install_path }}/fsfast/bin:{{ self.install_path }}/tktools:{{ self.install_path }}/mni/bin:$PATH' + FREESURFER_HOME: '{{ self.install_path }}' + FREESURFER: '{{ self.install_path }}' + SUBJECTS_DIR: '{{ self.install_path }}/subjects' + LOCAL_DIR: '{{ self.install_path }}/local' + FSFAST_HOME: '{{ self.install_path }}/fsfast' + FMRI_ANALYSIS_DIR: '{{ self.install_path }}/fsfast' + FUNCTIONALS_DIR: '{{ self.install_path }}/sessions' # default freesurfer options - FS_OVERRIDE: "0" - FIX_VERTEX_AREA: "" - FSF_OUTPUT_FORMAT: "nii.gz# mni env requirements" + FS_OVERRIDE: '0' + FIX_VERTEX_AREA: '' + FSF_OUTPUT_FORMAT: nii.gz# mni env requirements # mni environment requirements - MINC_BIN_DIR: "{{ self.install_path }}/mni/bin" - MINC_LIB_DIR: "{{ self.install_path }}/mni/lib" - MNI_DIR: "{{ self.install_path }}/mni" - MNI_DATAPATH: "{{ self.install_path }}/mni/data" - MNI_PERL5LIB: "{{ self.install_path }}/mni/share/perl5" - PERL5LIB: "{{ self.install_path }}/mni/share/perl5" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading FreeSurfer ..." - mkdir -p {{ self.install_path }} - curl -fL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --owner root --group root --no-same-owner --strip-components 1 {% if self.exclude_paths -%}\ - {%- for exclude_path in self.exclude_paths.split() %} - {% if not loop.last -%} - --exclude='{{ exclude_path }}' \ - {%- else -%} - --exclude='{{ exclude_path }}' - {%- endif -%} - {%- endfor %} - {%- endif %} + MINC_BIN_DIR: '{{ self.install_path }}/mni/bin' + MINC_LIB_DIR: '{{ self.install_path }}/mni/lib' + MNI_DIR: '{{ self.install_path }}/mni' + MNI_DATAPATH: '{{ self.install_path }}/mni/data' + MNI_PERL5LIB: '{{ self.install_path }}/mni/share/perl5' + PERL5LIB: '{{ self.install_path }}/mni/share/perl5' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading FreeSurfer ..." + mkdir -p {{ self.install_path }} + curl -fL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --owner root --group root --no-same-owner --strip-components 1 {% if self.exclude_paths -%}\ + {%- for exclude_path in self.exclude_paths.split() %} + {% if not loop.last -%} + --exclude='{{ exclude_path }}' \ + {%- else -%} + --exclude='{{ exclude_path }}' + {%- endif -%} + {%- endfor %} + {%- endif %} diff --git a/neurodocker/templates/fsl.yaml b/neurodocker/templates/fsl.yaml index 4d88e1b7..3f0baf86 100644 --- a/neurodocker/templates/fsl.yaml +++ b/neurodocker/templates/fsl.yaml @@ -1,3 +1,4 @@ +--- # Instructions to install FSL. # # ***************************************************************************** @@ -12,118 +13,118 @@ name: fsl url: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/ alert: FSL is non-free. If you are considering commercial use of FSL, please consult the relevant license(s). binaries: - arguments: - required: - - version - optional: - install_path: /opt/fsl-{{ self.version }} - exclude_paths: "" - urls: - "6.0.7.4": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.7.1": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.6.4": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.6.3": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.6.2": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.6.1": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.6": https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py - "6.0.5.2": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.2-centos7_64.tar.gz - "6.0.5.1": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.1-centos7_64.tar.gz - "6.0.5": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5-centos7_64.tar.gz - "6.0.4": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.4-centos6_64.tar.gz - "6.0.3": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.3-centos6_64.tar.gz - "6.0.2": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.2-centos6_64.tar.gz - "6.0.1": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.1-centos6_64.tar.gz - "6.0.0": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.0-centos6_64.tar.gz - "5.0.11": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.11-centos6_64.tar.gz - "5.0.10": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.10-centos6_64.tar.gz - "5.0.9": https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.9-centos6_64.tar.gz - "5.0.8": https://fsl.fmrib.ox.ac.uk/fsldownloads/oldversions/fsl-5.0.8-centos6_64.tar.gz - dependencies: - apt: - - bc - - ca-certificates - - curl - - dc - - file - - libfontconfig1 - - libfreetype6 - - libgl1-mesa-dev - - libgl1-mesa-dri - - libglu1-mesa-dev - - libgomp1 - - libice6 - - libopenblas-base - - libxcursor1 - - libxft2 - - libxinerama1 - - libxrandr2 - - libxrender1 - - libxt6 - - nano - - python3 - - sudo - - wget - yum: - - bc - - curl - - file - - libGL - - libGLU - - libICE - - libSM - - libX11 - - libXcursor - - libXext - - libXft - - libXinerama - - libXrandr - - libXt - - libgomp - - libjpeg - - libmng - - libpng12 - - nano - - openblas-serial - - python3 - - sudo - - wget - env: - FSLDIR: "{{ self.install_path }}" - PATH: "{{ self.install_path }}/bin:$PATH" - FSLOUTPUTTYPE: "NIFTI_GZ" - FSLMULTIFILEQUIT: "TRUE" - FSLTCLSH: "{{ self.install_path }}/bin/fsltclsh" - FSLWISH: "{{ self.install_path }}/bin/fslwish" - FSLLOCKDIR: "" - FSLMACHINELIST: "" - FSLREMOTECALL: "" - FSLGECUDAQ: "cuda.q" - instructions: | - {{ self.install_dependencies() }} - {% if self.version.split('.') | map('int') | list >= [6, 0, 6] %} - echo "Installing FSL ..." - curl -fsSL {{ self.urls[self.version] }} | python3 - -d {{ self.install_path }} -V {{ self.version }} - {% else %} - echo "Downloading FSL ..." - mkdir -p {{ self.install_path }} - curl -fL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --strip-components 1 {% if self.exclude_paths -%}\ - {%- for exclude_path in self.exclude_paths.split() %} - {% if not loop.last -%} - --exclude='{{ exclude_path }}' \ - {%- else -%} - --exclude='{{ exclude_path }}' - {%- endif -%} - {%- endfor %} - {%- endif %} - {% if self.version not in ("5.0.9", "5.0.8") -%} - echo "Installing FSL conda environment ..." - bash {{ self.install_path }}/etc/fslconf/fslpython_install.sh -f {{ self.install_path }} - {% endif -%} - {% if self.version in ("6.0.1") -%} - echo "Downgrading deprecation module per https://github.com/kaczmarj/neurodocker/issues/271#issuecomment-514523420" - {{ self.install_path }}/fslpython/bin/conda install -n fslpython -c conda-forge -y deprecation==1.* - echo "Removing bundled with FSLeyes libz likely incompatible with the one from OS" - rm -f {{ self.install_path }}/bin/FSLeyes/libz.so.1 - {% endif -%} - {% endif -%} + arguments: + required: + - version + optional: + install_path: /opt/fsl-{{ self.version }} + exclude_paths: '' + urls: + 6.0.7.4: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.7.1: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.6.4: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.6.3: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.6.2: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.6.1: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.6: https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py + 6.0.5.2: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.2-centos7_64.tar.gz + 6.0.5.1: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5.1-centos7_64.tar.gz + 6.0.5: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.5-centos7_64.tar.gz + 6.0.4: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.4-centos6_64.tar.gz + 6.0.3: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.3-centos6_64.tar.gz + 6.0.2: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.2-centos6_64.tar.gz + 6.0.1: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.1-centos6_64.tar.gz + 6.0.0: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.0-centos6_64.tar.gz + 5.0.11: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.11-centos6_64.tar.gz + 5.0.10: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.10-centos6_64.tar.gz + 5.0.9: https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.9-centos6_64.tar.gz + 5.0.8: https://fsl.fmrib.ox.ac.uk/fsldownloads/oldversions/fsl-5.0.8-centos6_64.tar.gz + dependencies: + apt: + - bc + - ca-certificates + - curl + - dc + - file + - libfontconfig1 + - libfreetype6 + - libgl1-mesa-dev + - libgl1-mesa-dri + - libglu1-mesa-dev + - libgomp1 + - libice6 + - libopenblas-base + - libxcursor1 + - libxft2 + - libxinerama1 + - libxrandr2 + - libxrender1 + - libxt6 + - nano + - python3 + - sudo + - wget + yum: + - bc + - curl + - file + - libGL + - libGLU + - libICE + - libSM + - libX11 + - libXcursor + - libXext + - libXft + - libXinerama + - libXrandr + - libXt + - libgomp + - libjpeg + - libmng + - libpng12 + - nano + - openblas-serial + - python3 + - sudo + - wget + env: + FSLDIR: '{{ self.install_path }}' + PATH: '{{ self.install_path }}/bin:$PATH' + FSLOUTPUTTYPE: NIFTI_GZ + FSLMULTIFILEQUIT: 'TRUE' + FSLTCLSH: '{{ self.install_path }}/bin/fsltclsh' + FSLWISH: '{{ self.install_path }}/bin/fslwish' + FSLLOCKDIR: '' + FSLMACHINELIST: '' + FSLREMOTECALL: '' + FSLGECUDAQ: cuda.q + instructions: | + {{ self.install_dependencies() }} + {% if self.version.split('.') | map('int') | list >= [6, 0, 6] %} + echo "Installing FSL ..." + curl -fsSL {{ self.urls[self.version] }} | python3 - -d {{ self.install_path }} -V {{ self.version }} + {% else %} + echo "Downloading FSL ..." + mkdir -p {{ self.install_path }} + curl -fL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --strip-components 1 {% if self.exclude_paths -%}\ + {%- for exclude_path in self.exclude_paths.split() %} + {% if not loop.last -%} + --exclude='{{ exclude_path }}' \ + {%- else -%} + --exclude='{{ exclude_path }}' + {%- endif -%} + {%- endfor %} + {%- endif %} + {% if self.version not in ("5.0.9", "5.0.8") -%} + echo "Installing FSL conda environment ..." + bash {{ self.install_path }}/etc/fslconf/fslpython_install.sh -f {{ self.install_path }} + {% endif -%} + {% if self.version in ("6.0.1") -%} + echo "Downgrading deprecation module per https://github.com/kaczmarj/neurodocker/issues/271#issuecomment-514523420" + {{ self.install_path }}/fslpython/bin/conda install -n fslpython -c conda-forge -y deprecation==1.* + echo "Removing bundled with FSLeyes libz likely incompatible with the one from OS" + rm -f {{ self.install_path }}/bin/FSLeyes/libz.so.1 + {% endif -%} + {% endif -%} diff --git a/neurodocker/templates/jq.yaml b/neurodocker/templates/jq.yaml index 4ab464df..6d2d6d3b 100644 --- a/neurodocker/templates/jq.yaml +++ b/neurodocker/templates/jq.yaml @@ -1,51 +1,52 @@ +--- # Sample template. Installs `jq` (a JSON parser) from binaries or from source. name: jq url: https://jqlang.github.io/jq/ binaries: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - yum: - - curl - instructions: | - {{ self.install_dependencies() }} - curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} - chmod +x /usr/local/bin/jq - urls: - '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 - '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + yum: + - curl + instructions: | + {{ self.install_dependencies() }} + curl -fsSL --output /usr/local/bin/jq {{ self.urls[self.version]}} + chmod +x /usr/local/bin/jq + urls: + '1.6': https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 + '1.5': https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 source: - arguments: - required: - - version - dependencies: - apt: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - yum: - - ca-certificates - - curl - - automake - - gcc - - git - - libtool - - make - instructions: | - mkdir jq - cd jq - curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ - | tar xz --strip-components 1 - {% if self.version == "1.6" -%} autoreconf -fi {% endif %} - ./configure --disable-maintainer-mode - make - make install + arguments: + required: + - version + dependencies: + apt: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + yum: + - ca-certificates + - curl + - automake + - gcc + - git + - libtool + - make + instructions: | + mkdir jq + cd jq + curl -fsSL https://github.com/stedolan/jq/releases/download/jq-{{self.version}}/jq-{{self.version}}.tar.gz \ + | tar xz --strip-components 1 + {% if self.version == "1.6" -%} autoreconf -fi {% endif %} + ./configure --disable-maintainer-mode + make + make install diff --git a/neurodocker/templates/matlabmcr.yaml b/neurodocker/templates/matlabmcr.yaml index b3ed41ed..d693b739 100644 --- a/neurodocker/templates/matlabmcr.yaml +++ b/neurodocker/templates/matlabmcr.yaml @@ -4,83 +4,83 @@ name: matlabmcr url: https://www.mathworks.com/products/compiler/matlab-runtime.html binaries: - arguments: - required: - - version - optional: - curl_opts: "" - install_path: /opt/MCR-{{ self.version }} - urls: - "2023b": https://ssd.mathworks.com/supportfiles/downloads/R2023b/Release/3/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2023b_Update_3_glnxa64.zip - "2023a": https://ssd.mathworks.com/supportfiles/downloads/R2023a/Release/5/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2023a_Update_5_glnxa64.zip - "2022b": https://ssd.mathworks.com/supportfiles/downloads/R2022b/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2022b_Update_7_glnxa64.zip - "2022a": https://ssd.mathworks.com/supportfiles/downloads/R2022a/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2022a_Update_7_glnxa64.zip - "2021b": https://ssd.mathworks.com/supportfiles/downloads/R2021b/Release/2/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021b_Update_2_glnxa64.zip - "2021a": https://ssd.mathworks.com/supportfiles/downloads/R2021a/Release/8/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021a_Update_8_glnxa64.zip - "2020b": https://ssd.mathworks.com/supportfiles/downloads/R2020b/Release/8/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020b_Update_8_glnxa64.zip - "2020a": https://ssd.mathworks.com/supportfiles/downloads/R2020a/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020a_Update_7_glnxa64.zip - "2019b": https://ssd.mathworks.com/supportfiles/downloads/R2019b/Release/9/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019b_Update_9_glnxa64.zip - "2019a": https://ssd.mathworks.com/supportfiles/downloads/R2019a/Release/9/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019a_Update_9_glnxa64.zip - "2018b": https://ssd.mathworks.com/supportfiles/downloads/R2018b/deployment_files/R2018b/installers/glnxa64/MCR_R2018b_glnxa64_installer.zip - "2018a": https://ssd.mathworks.com/supportfiles/downloads/R2018a/deployment_files/R2018a/installers/glnxa64/MCR_R2018a_glnxa64_installer.zip - "2017b": https://ssd.mathworks.com/supportfiles/downloads/R2017b/deployment_files/R2017b/installers/glnxa64/MCR_R2017b_glnxa64_installer.zip - "2017a": https://ssd.mathworks.com/supportfiles/downloads/R2017a/deployment_files/R2017a/installers/glnxa64/MCR_R2017a_glnxa64_installer.zip - "2016b": https://ssd.mathworks.com/supportfiles/downloads/R2016b/deployment_files/R2016b/installers/glnxa64/MCR_R2016b_glnxa64_installer.zip - "2016a": https://ssd.mathworks.com/supportfiles/downloads/R2016a/deployment_files/R2016a/installers/glnxa64/MCR_R2016a_glnxa64_installer.zip - "2015b": https://ssd.mathworks.com/supportfiles/downloads/R2015b/deployment_files/R2015b/installers/glnxa64/MCR_R2015b_glnxa64_installer.zip - "2015aSP1": https://ssd.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015aSP1/installers/glnxa64/MCR_R2015aSP1_glnxa64_installer.zip - "2015a": https://ssd.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015a/installers/glnxa64/MCR_R2015a_glnxa64_installer.zip - "2014a": https://ssd.mathworks.com/supportfiles/downloads/R2014a/deployment_files/R2014a/installers/glnxa64/MCR_R2014a_glnxa64_installer.zip - "2014b": https://ssd.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/glnxa64/MCR_R2014b_glnxa64_installer.zip - "2013b": https://ssd.mathworks.com/supportfiles/downloads/R2013b/deployment_files/R2013b/installers/glnxa64/MCR_R2013b_glnxa64_installer.zip - "2013a": https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2013a/MCR_R2013a_glnxa64_installer.zip - "2012b": https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2012b/MCR_R2012b_glnxa64_installer.zip - "2012a": https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2012a/MCR_R2012a_glnxa64_installer.zip - "2010a": https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin - dependencies: - apt: - - bc - - curl - - libncurses5 - - libxext6 - - libxmu6 - - libxpm-dev - - libxt6 - - unzip - - openjdk-8-jre - - dbus-x11 - yum: - - bc - - curl - - libXext.x86_64 - - libXmu - - libXpm - - libXt.x86_64 - - unzip - - java-1.8.0-openjdk - - dbus-x11 - env: - LD_LIBRARY_PATH: | - {% set versionTovXX = {"2023b": "v915", "2023a": "v914", "2022b": "v913", "2022a": "v912", "2021b": "v911", "2021a": "v910", "2020b": "v99", "2020a": "v98", "2019b": "v97", "2019a": "v96", "2018b": "v95", "2018a": "v94", "2017b": "v93", "2017a": "v92", "2016b": "v91", "2016a": "v901", "2015b": "v90", "2015aSP1": "v851", "2015a": "v85", "2014b": "v84", "2014a": "v83", "2013b": "v82", "2013a": "v81", "2012b": "v80", "2012a": "v717"} -%} - $LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:{{ self.install_path }}/{{ versionTovXX[self.version] }}/runtime/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/bin/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/sys/os/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/extern/bin/glnxa64 - MATLABCMD: "{{ self.install_path }}/{{ self.version }}/toolbox/matlab" - XAPPLRESDIR: | - {% set versionTovXX = {"2023b": "v915", "2023a": "v914", "2022b": "v913", "2022a": "v912", "2021b": "v911", "2021a": "v910", "2020b": "v99", "2020a": "v98", "2019b": "v97", "2019a": "v96", "2018b": "v95", "2018a": "v94", "2017b": "v93", "2017a": "v92", "2016b": "v91", "2016a": "v901", "2015b": "v90", "2015aSP1": "v851", "2015a": "v85", "2014b": "v84", "2014a": "v83", "2013b": "v82", "2013a": "v81", "2012b": "v80", "2012a": "v717"} -%} - /opt/{{ self.install_path }}/{{ versionTovXX[self.version] }}/x11/app-defaults - MCRROOT: "{{ self.install_path }}/{{ self.version }}" + arguments: + required: + - version + optional: + curl_opts: '' + install_path: /opt/MCR-{{ self.version }} + urls: + 2023b: https://ssd.mathworks.com/supportfiles/downloads/R2023b/Release/3/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2023b_Update_3_glnxa64.zip + 2023a: https://ssd.mathworks.com/supportfiles/downloads/R2023a/Release/5/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2023a_Update_5_glnxa64.zip + 2022b: https://ssd.mathworks.com/supportfiles/downloads/R2022b/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2022b_Update_7_glnxa64.zip + 2022a: https://ssd.mathworks.com/supportfiles/downloads/R2022a/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2022a_Update_7_glnxa64.zip + 2021b: https://ssd.mathworks.com/supportfiles/downloads/R2021b/Release/2/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021b_Update_2_glnxa64.zip + 2021a: https://ssd.mathworks.com/supportfiles/downloads/R2021a/Release/8/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2021a_Update_8_glnxa64.zip + 2020b: https://ssd.mathworks.com/supportfiles/downloads/R2020b/Release/8/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020b_Update_8_glnxa64.zip + 2020a: https://ssd.mathworks.com/supportfiles/downloads/R2020a/Release/7/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020a_Update_7_glnxa64.zip + 2019b: https://ssd.mathworks.com/supportfiles/downloads/R2019b/Release/9/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019b_Update_9_glnxa64.zip + 2019a: https://ssd.mathworks.com/supportfiles/downloads/R2019a/Release/9/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019a_Update_9_glnxa64.zip + 2018b: https://ssd.mathworks.com/supportfiles/downloads/R2018b/deployment_files/R2018b/installers/glnxa64/MCR_R2018b_glnxa64_installer.zip + 2018a: https://ssd.mathworks.com/supportfiles/downloads/R2018a/deployment_files/R2018a/installers/glnxa64/MCR_R2018a_glnxa64_installer.zip + 2017b: https://ssd.mathworks.com/supportfiles/downloads/R2017b/deployment_files/R2017b/installers/glnxa64/MCR_R2017b_glnxa64_installer.zip + 2017a: https://ssd.mathworks.com/supportfiles/downloads/R2017a/deployment_files/R2017a/installers/glnxa64/MCR_R2017a_glnxa64_installer.zip + 2016b: https://ssd.mathworks.com/supportfiles/downloads/R2016b/deployment_files/R2016b/installers/glnxa64/MCR_R2016b_glnxa64_installer.zip + 2016a: https://ssd.mathworks.com/supportfiles/downloads/R2016a/deployment_files/R2016a/installers/glnxa64/MCR_R2016a_glnxa64_installer.zip + 2015b: https://ssd.mathworks.com/supportfiles/downloads/R2015b/deployment_files/R2015b/installers/glnxa64/MCR_R2015b_glnxa64_installer.zip + 2015aSP1: https://ssd.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015aSP1/installers/glnxa64/MCR_R2015aSP1_glnxa64_installer.zip + 2015a: https://ssd.mathworks.com/supportfiles/downloads/R2015a/deployment_files/R2015a/installers/glnxa64/MCR_R2015a_glnxa64_installer.zip + 2014a: https://ssd.mathworks.com/supportfiles/downloads/R2014a/deployment_files/R2014a/installers/glnxa64/MCR_R2014a_glnxa64_installer.zip + 2014b: https://ssd.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/glnxa64/MCR_R2014b_glnxa64_installer.zip + 2013b: https://ssd.mathworks.com/supportfiles/downloads/R2013b/deployment_files/R2013b/installers/glnxa64/MCR_R2013b_glnxa64_installer.zip + 2013a: https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2013a/MCR_R2013a_glnxa64_installer.zip + 2012b: https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2012b/MCR_R2012b_glnxa64_installer.zip + 2012a: https://ssd.mathworks.com/supportfiles/MCR_Runtime/R2012a/MCR_R2012a_glnxa64_installer.zip + 2010a: https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin + dependencies: + apt: + - bc + - curl + - libncurses5 + - libxext6 + - libxmu6 + - libxpm-dev + - libxt6 + - unzip + - openjdk-8-jre + - dbus-x11 + yum: + - bc + - curl + - libXext.x86_64 + - libXmu + - libXpm + - libXt.x86_64 + - unzip + - java-1.8.0-openjdk + - dbus-x11 + env: + LD_LIBRARY_PATH: | + {% set versionTovXX = {"2023b": "v915", "2023a": "v914", "2022b": "v913", "2022a": "v912", "2021b": "v911", "2021a": "v910", "2020b": "v99", "2020a": "v98", "2019b": "v97", "2019a": "v96", "2018b": "v95", "2018a": "v94", "2017b": "v93", "2017a": "v92", "2016b": "v91", "2016a": "v901", "2015b": "v90", "2015aSP1": "v851", "2015a": "v85", "2014b": "v84", "2014a": "v83", "2013b": "v82", "2013a": "v81", "2012b": "v80", "2012a": "v717"} -%} + $LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:{{ self.install_path }}/{{ versionTovXX[self.version] }}/runtime/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/bin/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/sys/os/glnxa64:{{ self.install_path }}/{{ versionTovXX[self.version] }}/extern/bin/glnxa64 + MATLABCMD: '{{ self.install_path }}/{{ self.version }}/toolbox/matlab' + XAPPLRESDIR: | + {% set versionTovXX = {"2023b": "v915", "2023a": "v914", "2022b": "v913", "2022a": "v912", "2021b": "v911", "2021a": "v910", "2020b": "v99", "2020a": "v98", "2019b": "v97", "2019a": "v96", "2018b": "v95", "2018a": "v94", "2017b": "v93", "2017a": "v92", "2016b": "v91", "2016a": "v901", "2015b": "v90", "2015aSP1": "v851", "2015a": "v85", "2014b": "v84", "2014a": "v83", "2013b": "v82", "2013a": "v81", "2012b": "v80", "2012a": "v717"} -%} + /opt/{{ self.install_path }}/{{ versionTovXX[self.version] }}/x11/app-defaults + MCRROOT: '{{ self.install_path }}/{{ self.version }}' - instructions: | - export TMPDIR="$(mktemp -d)" - {{ self.install_dependencies() }} - echo "Downloading MATLAB Compiler Runtime ..." - {% if self.version == "2010a" -%} - curl {{ self.curl_opts }} -o "$TMPDIR/MCRInstaller.bin" {{ self.urls[self.version] }} - chmod +x "$TMPDIR/MCRInstaller.bin" - "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="{{ self.install_path }}" - {% else -%} - curl {{ self.curl_opts }} -o "$TMPDIR/mcr.zip" {{ self.urls[self.version] }} - unzip -q "$TMPDIR/mcr.zip" -d "$TMPDIR/mcrtmp" - "$TMPDIR/mcrtmp/install" -destinationFolder {{ self.install_path }} -mode silent -agreeToLicense yes - {% endif -%} - rm -rf "$TMPDIR" - unset TMPDIR + instructions: | + export TMPDIR="$(mktemp -d)" + {{ self.install_dependencies() }} + echo "Downloading MATLAB Compiler Runtime ..." + {% if self.version == "2010a" -%} + curl {{ self.curl_opts }} -o "$TMPDIR/MCRInstaller.bin" {{ self.urls[self.version] }} + chmod +x "$TMPDIR/MCRInstaller.bin" + "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="{{ self.install_path }}" + {% else -%} + curl {{ self.curl_opts }} -o "$TMPDIR/mcr.zip" {{ self.urls[self.version] }} + unzip -q "$TMPDIR/mcr.zip" -d "$TMPDIR/mcrtmp" + "$TMPDIR/mcrtmp/install" -destinationFolder {{ self.install_path }} -mode silent -agreeToLicense yes + {% endif -%} + rm -rf "$TMPDIR" + unset TMPDIR diff --git a/neurodocker/templates/minc.yaml b/neurodocker/templates/minc.yaml index 6ab50a4e..2f4cfadf 100644 --- a/neurodocker/templates/minc.yaml +++ b/neurodocker/templates/minc.yaml @@ -1,91 +1,92 @@ +--- # Instructions to install MINC toolkit v2. # # Instructions: http://bic-mni.github.io/#on-debianubuntu # The Debian packages are unpacked for yum based distributions as well name: minc -url: https://github.com/BIC-MNI/minc-toolkit-v2 +url: https://github.com/BIC-MNI/minc-toolkit-v2 binaries: - arguments: - required: - - version - optional: - install_path: /opt/minc-{{ self.version }} - urls: - "1.9.15": https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.15-20170529-Ubuntu_16.04-x86_64.deb - "1.9.16": https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.16-20180117-Ubuntu_18.04-x86_64.deb - "1.9.17": https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.17-20190313-Ubuntu_18.04-x86_64.deb - "1.9.18": https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.18-20200813-Ubuntu_18.04-x86_64.deb - dependencies: - apt: - - ca-certificates - - curl - - libgl1-mesa-dev - - libice6 - - libsm6 - - libx11-6 - - libxext6 - - libxi6 - - libxmu6 - - libgomp1 - - libjpeg62 - - unzip - - octave - - libglu1-mesa - - libgl1-mesa-glx - - perl - - imagemagick - - bc - - ed - - libc6 - - libstdc++6 - - gdebi-core - - binutils - - git - yum: - - curl - - libICE - - libSM - - libX11 - - libXext - - libXi - - libXmu - - libgomp - - libjpeg-turbo - - mesa-libGL-devel - - unzip - - octave - - mesa-dri-drivers - - epel-release - - glibc - - libstdc++ - - ImageMagick - - perl - - binutils - - git - env: - MINC_TOOLKIT: "{{ self.install_path }}" - MINC_TOOLKIT_VERSION: "{{ self.install_path }}" - PATH: "{{ self.install_path }}/bin:{{ self.install_path }}/volgenmodel-nipype/extra-scripts:{{ self.install_path }}/pipeline:$PATH" - PERL5LIB: "{{ self.install_path }}/perl:{{ self.install_path }}/pipeline:${PERL5LIB}" - LD_LIBRARY_PATH: "{{ self.install_path }}/lib:{{ self.install_path }}/lib/InsightToolkit:${LD_LIBRARY_PATH}" - MNI_DATAPATH: "{{ self.install_path }}/share" - MINC_FORCE_V2: "1" - MINC_COMPRESS: "4" - VOLUME_CACHE_THRESHOLD: "-1" - MANPATH: "{{ self.install_path }}/man:${MANPATH}" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading MINC, BEASTLIB, and MODELS..." - cd / - # ar allows to extract the debian package so we can also install this in centos based OSs. - curl {{ self.urls[self.version] }} -o minc.deb && ar p minc.deb data.tar.gz | tar zx && rm minc.deb - ln -s /opt/minc/{{ self.version }} {{ self.install_path }} - git clone https://github.com/CAIsr/volgenmodel-nipype.git {{ self.install_path }}/volgenmodel-nipype/ - curl -fL http://packages.bic.mni.mcgill.ca/tgz/beast-library-1.1.tar.gz \ - | tar -xz -C {{ self.install_path }}/share - curl -fL -o /tmp/mni_90a.zip http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/mni_icbm152_nlin_sym_09a_minc2.zip - unzip /tmp/mni_90a.zip -d {{ self.install_path }}/share/icbm152_model_09a - curl -fL -o /tmp/mni_90c.zip http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/mni_icbm152_nlin_sym_09c_minc2.zip - unzip /tmp/mni_90c.zip -d {{ self.install_path }}/share/icbm152_model_09c - rm -rf /tmp/mni* + arguments: + required: + - version + optional: + install_path: /opt/minc-{{ self.version }} + urls: + 1.9.15: https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.15-20170529-Ubuntu_16.04-x86_64.deb + 1.9.16: https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.16-20180117-Ubuntu_18.04-x86_64.deb + 1.9.17: https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.17-20190313-Ubuntu_18.04-x86_64.deb + 1.9.18: https://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.18-20200813-Ubuntu_18.04-x86_64.deb + dependencies: + apt: + - ca-certificates + - curl + - libgl1-mesa-dev + - libice6 + - libsm6 + - libx11-6 + - libxext6 + - libxi6 + - libxmu6 + - libgomp1 + - libjpeg62 + - unzip + - octave + - libglu1-mesa + - libgl1-mesa-glx + - perl + - imagemagick + - bc + - ed + - libc6 + - libstdc++6 + - gdebi-core + - binutils + - git + yum: + - curl + - libICE + - libSM + - libX11 + - libXext + - libXi + - libXmu + - libgomp + - libjpeg-turbo + - mesa-libGL-devel + - unzip + - octave + - mesa-dri-drivers + - epel-release + - glibc + - libstdc++ + - ImageMagick + - perl + - binutils + - git + env: + MINC_TOOLKIT: '{{ self.install_path }}' + MINC_TOOLKIT_VERSION: '{{ self.install_path }}' + PATH: '{{ self.install_path }}/bin:{{ self.install_path }}/volgenmodel-nipype/extra-scripts:{{ self.install_path }}/pipeline:$PATH' + PERL5LIB: '{{ self.install_path }}/perl:{{ self.install_path }}/pipeline:${PERL5LIB}' + LD_LIBRARY_PATH: '{{ self.install_path }}/lib:{{ self.install_path }}/lib/InsightToolkit:${LD_LIBRARY_PATH}' + MNI_DATAPATH: '{{ self.install_path }}/share' + MINC_FORCE_V2: '1' + MINC_COMPRESS: '4' + VOLUME_CACHE_THRESHOLD: '-1' + MANPATH: '{{ self.install_path }}/man:${MANPATH}' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading MINC, BEASTLIB, and MODELS..." + cd / + # ar allows to extract the debian package so we can also install this in centos based OSs. + curl {{ self.urls[self.version] }} -o minc.deb && ar p minc.deb data.tar.gz | tar zx && rm minc.deb + ln -s /opt/minc/{{ self.version }} {{ self.install_path }} + git clone https://github.com/CAIsr/volgenmodel-nipype.git {{ self.install_path }}/volgenmodel-nipype/ + curl -fL http://packages.bic.mni.mcgill.ca/tgz/beast-library-1.1.tar.gz \ + | tar -xz -C {{ self.install_path }}/share + curl -fL -o /tmp/mni_90a.zip http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/mni_icbm152_nlin_sym_09a_minc2.zip + unzip /tmp/mni_90a.zip -d {{ self.install_path }}/share/icbm152_model_09a + curl -fL -o /tmp/mni_90c.zip http://www.bic.mni.mcgill.ca/~vfonov/icbm/2009/mni_icbm152_nlin_sym_09c_minc2.zip + unzip /tmp/mni_90c.zip -d {{ self.install_path }}/share/icbm152_model_09c + rm -rf /tmp/mni* diff --git a/neurodocker/templates/miniconda.yaml b/neurodocker/templates/miniconda.yaml index b6bd87d9..412328f5 100644 --- a/neurodocker/templates/miniconda.yaml +++ b/neurodocker/templates/miniconda.yaml @@ -1,94 +1,95 @@ +--- # Instructions to install Miniconda. name: miniconda url: https://docs.conda.io/projects/miniconda/en/latest/ binaries: - urls: - latest: https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh - "*": https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh - env: - CONDA_DIR: '{{ self.install_path }}' - PATH: '{{ self.install_path }}/bin:$PATH' - dependencies: - apt: - - bzip2 - - ca-certificates - - curl - yum: - - bzip2 - - curl - arguments: - required: - - version - optional: - install_path: /opt/miniconda-{{ self.version }} + urls: + latest: https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh + '*': https://repo.continuum.io/miniconda/Miniconda3-{{ self.version }}-Linux-x86_64.sh + env: + CONDA_DIR: '{{ self.install_path }}' + PATH: '{{ self.install_path }}/bin:$PATH' + dependencies: + apt: + - bzip2 + - ca-certificates + - curl + yum: + - bzip2 + - curl + arguments: + required: + - version + optional: + install_path: /opt/miniconda-{{ self.version }} # We do not use a boolean type here because all keywords to the templates are # expected to be strings. - installed: "false" - env_name: base - env_exists: "true" - conda_install: "" - pip_install: "" - conda_opts: "" - pip_opts: "" - yaml_file: "" - mamba: "false" - instructions: | - {% if not self.installed.lower() in ["true", "y", "1"] -%} - {{ self.install_dependencies() }} - # Install dependencies. - export PATH="{{ self.install_path }}/bin:$PATH" - echo "Downloading Miniconda installer ..." - conda_installer="/tmp/miniconda.sh" - curl -fsSL -o "$conda_installer" {{ self.urls["*"] }} - bash "$conda_installer" -b -p {{ self.install_path }} - rm -f "$conda_installer" - {% if self.version == "latest" -%} - conda update -yq -nbase conda - {% endif -%} - {% if self.mamba == "true" -%} - conda install -yq -nbase conda-libmamba-solver - conda config --set solver libmamba - {% endif -%} - # Prefer packages in conda-forge - conda config --system --prepend channels conda-forge - # Packages in lower-priority channels not considered if a package with the same - # name exists in a higher priority channel. Can dramatically speed up installations. - # Conda recommends this as a default - # https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html - conda config --set channel_priority strict - conda config --system --set auto_update_conda false - conda config --system --set show_channel_urls true - # Enable `conda activate` - conda init bash - {% endif -%} - {% if self.yaml_file -%} - {% if self.env_name == "base" %}{{ raise("Environment name cannot be 'base' if creating an environment from a YAML file.") }}{% endif -%} - conda env create {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} --file {{ self.yaml_file }} - {% elif self.env_exists.lower() not in ["true", "y", "1"] -%} - conda create -y {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} - {% endif -%} - {% if self.conda_install -%} - conda install -y {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} \ - {%- for pkg in self.conda_install.split() %} - {% if not loop.last -%} - "{{ pkg }}" \ - {%- else -%} - "{{ pkg }}" - {%- endif -%} - {% endfor %} - {% endif -%} - {% if self.pip_install -%} - bash -c "source activate {{ self.env_name }} - python -m pip install --no-cache-dir {{ self.pip_opts }} \ - {%- for pkg in self.pip_install.split() %} - {% if not loop.last -%} - "{{ pkg }}" \ - {%- else -%} - "{{ pkg }}" - {%- endif -%} - {% endfor %}" - {% endif -%} - # Clean up - sync && conda clean --all --yes && sync - rm -rf ~/.cache/pip/* + installed: 'false' + env_name: base + env_exists: 'true' + conda_install: '' + pip_install: '' + conda_opts: '' + pip_opts: '' + yaml_file: '' + mamba: 'false' + instructions: | + {% if not self.installed.lower() in ["true", "y", "1"] -%} + {{ self.install_dependencies() }} + # Install dependencies. + export PATH="{{ self.install_path }}/bin:$PATH" + echo "Downloading Miniconda installer ..." + conda_installer="/tmp/miniconda.sh" + curl -fsSL -o "$conda_installer" {{ self.urls["*"] }} + bash "$conda_installer" -b -p {{ self.install_path }} + rm -f "$conda_installer" + {% if self.version == "latest" -%} + conda update -yq -nbase conda + {% endif -%} + {% if self.mamba == "true" -%} + conda install -yq -nbase conda-libmamba-solver + conda config --set solver libmamba + {% endif -%} + # Prefer packages in conda-forge + conda config --system --prepend channels conda-forge + # Packages in lower-priority channels not considered if a package with the same + # name exists in a higher priority channel. Can dramatically speed up installations. + # Conda recommends this as a default + # https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html + conda config --set channel_priority strict + conda config --system --set auto_update_conda false + conda config --system --set show_channel_urls true + # Enable `conda activate` + conda init bash + {% endif -%} + {% if self.yaml_file -%} + {% if self.env_name == "base" %}{{ raise("Environment name cannot be 'base' if creating an environment from a YAML file.") }}{% endif -%} + conda env create {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} --file {{ self.yaml_file }} + {% elif self.env_exists.lower() not in ["true", "y", "1"] -%} + conda create -y {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} + {% endif -%} + {% if self.conda_install -%} + conda install -y {{ self.conda_opts|default("-q") }} --name {{ self.env_name }} \ + {%- for pkg in self.conda_install.split() %} + {% if not loop.last -%} + "{{ pkg }}" \ + {%- else -%} + "{{ pkg }}" + {%- endif -%} + {% endfor %} + {% endif -%} + {% if self.pip_install -%} + bash -c "source activate {{ self.env_name }} + python -m pip install --no-cache-dir {{ self.pip_opts }} \ + {%- for pkg in self.pip_install.split() %} + {% if not loop.last -%} + "{{ pkg }}" \ + {%- else -%} + "{{ pkg }}" + {%- endif -%} + {% endfor %}" + {% endif -%} + # Clean up + sync && conda clean --all --yes && sync + rm -rf ~/.cache/pip/* diff --git a/neurodocker/templates/mricron.yaml b/neurodocker/templates/mricron.yaml index d1f0808c..a8660a89 100644 --- a/neurodocker/templates/mricron.yaml +++ b/neurodocker/templates/mricron.yaml @@ -1,41 +1,42 @@ +--- # Instructions to install MRIcron. name: mricron url: https://github.com/neurolabusc/MRIcron binaries: - arguments: - required: - - version - optional: - install_path: /opt/mricron-{{ self.version }} - urls: - "1.0.20190902": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190902/MRIcron_linux.zip - "1.0.20190410": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190410/mricron_linux.zip - "1.0.20181114": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20181114/mricron_linux.zip - "1.0.20180614": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180614/mricron_linux.zip - "1.0.20180404": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180404/mricron_lx64.zip - "1.0.20171220": https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20171220/mricron_linux.zip - dependencies: - apt: - - ca-certificates - - curl - - libatk-adaptor - - libcanberra-gtk-module - - libgail-common - - libgtk2.0-0 - - unzip - yum: - - curl - - gtk2 - - unzip - env: - PATH: "{{ self.install_path }}:$PATH" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading MRIcron ..." - mkdir -p {{ self.install_path }} - curl -fL -O {{ self.urls[self.version] }} - unzip "*cron*.zip" - rm -f "*cron*.zip" - mv mricron/* {{ self.install_path }} - rmdir mricron + arguments: + required: + - version + optional: + install_path: /opt/mricron-{{ self.version }} + urls: + 1.0.20190902: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190902/MRIcron_linux.zip + 1.0.20190410: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20190410/mricron_linux.zip + 1.0.20181114: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20181114/mricron_linux.zip + 1.0.20180614: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180614/mricron_linux.zip + 1.0.20180404: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20180404/mricron_lx64.zip + 1.0.20171220: https://github.com/neurolabusc/MRIcron/releases/download/v1.0.20171220/mricron_linux.zip + dependencies: + apt: + - ca-certificates + - curl + - libatk-adaptor + - libcanberra-gtk-module + - libgail-common + - libgtk2.0-0 + - unzip + yum: + - curl + - gtk2 + - unzip + env: + PATH: '{{ self.install_path }}:$PATH' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading MRIcron ..." + mkdir -p {{ self.install_path }} + curl -fL -O {{ self.urls[self.version] }} + unzip "*cron*.zip" + rm -f "*cron*.zip" + mv mricron/* {{ self.install_path }} + rmdir mricron diff --git a/neurodocker/templates/mrtrix3.yaml b/neurodocker/templates/mrtrix3.yaml index 9b196bce..ea5d7b2a 100644 --- a/neurodocker/templates/mrtrix3.yaml +++ b/neurodocker/templates/mrtrix3.yaml @@ -1,81 +1,82 @@ +--- # Instructions to install MRtrix3. name: mrtrix3 url: https://www.mrtrix.org/ binaries: - arguments: - required: - - version - optional: - install_path: /opt/mrtrix3-{{ self.version }} - build_processes: "1" - dependencies: - apt: - - bzip2 - - ca-certificates - - curl - - libpng16-16 - - libtiff5 - yum: - - bzip2 - - curl - - fftw3 - - libpng - - libtiff - urls: - "3.0.4": https://github.com/MRtrix3/mrtrix3/releases/download/3.0.4/conda-linux-mrtrix3-3.0.4-h2bc3f7f_0.tar.bz2 - "3.0.3": https://github.com/MRtrix3/mrtrix3/releases/download/3.0.3/conda-linux-mrtrix3-3.0.3-h2bc3f7f_0.tar.bz2 - "3.0.2": https://github.com/MRtrix3/mrtrix3/releases/download/3.0.2/conda-linux-mrtrix3-3.0.2-h6bb024c_0.tar.bz2 - "3.0.1": https://github.com/MRtrix3/mrtrix3/releases/download/3.0.1/conda-linux-mrtrix3-3.0.1-h6bb024c_0.tar.bz2 - "3.0.0": https://github.com/MRtrix3/mrtrix3/releases/download/3.0.0/conda-linux-mrtrix3-3.0.0-h6bb024c_0.tar.bz2 - env: - PATH: "{{ self.install_path }}/bin:$PATH" - LD_LIBRARY_PATH: "{{ self.install_path }}/lib:$PATH" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading MRtrix3 ..." - mkdir -p {{ self.install_path }} - curl -fsSL {{ self.urls[self.version] }} \ - | tar -xj -C {{ self.install_path }} + arguments: + required: + - version + optional: + install_path: /opt/mrtrix3-{{ self.version }} + build_processes: '1' + dependencies: + apt: + - bzip2 + - ca-certificates + - curl + - libpng16-16 + - libtiff5 + yum: + - bzip2 + - curl + - fftw3 + - libpng + - libtiff + urls: + 3.0.4: https://github.com/MRtrix3/mrtrix3/releases/download/3.0.4/conda-linux-mrtrix3-3.0.4-h2bc3f7f_0.tar.bz2 + 3.0.3: https://github.com/MRtrix3/mrtrix3/releases/download/3.0.3/conda-linux-mrtrix3-3.0.3-h2bc3f7f_0.tar.bz2 + 3.0.2: https://github.com/MRtrix3/mrtrix3/releases/download/3.0.2/conda-linux-mrtrix3-3.0.2-h6bb024c_0.tar.bz2 + 3.0.1: https://github.com/MRtrix3/mrtrix3/releases/download/3.0.1/conda-linux-mrtrix3-3.0.1-h6bb024c_0.tar.bz2 + 3.0.0: https://github.com/MRtrix3/mrtrix3/releases/download/3.0.0/conda-linux-mrtrix3-3.0.0-h6bb024c_0.tar.bz2 + env: + PATH: '{{ self.install_path }}/bin:$PATH' + LD_LIBRARY_PATH: '{{ self.install_path }}/lib:$PATH' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading MRtrix3 ..." + mkdir -p {{ self.install_path }} + curl -fsSL {{ self.urls[self.version] }} \ + | tar -xj -C {{ self.install_path }} source: - arguments: - required: - - version - optional: - repo: https://github.com/MRtrix3/mrtrix3.git - install_path: /opt/mrtrix3-{{ self.version }} - build_processes: "1" - dependencies: - apt: - - ca-certificates - - g++ - - gcc - - git - - libeigen3-dev - - make - - python3 - - python3-numpy - - zlib1g-dev - yum: - - eigen3-devel - - gcc-c++ - - git - - make - - numpy - - python3 - - zlib-devel - env: - PATH: "{{ self.install_path }}/bin:$PATH" - LD_LIBRARY_PATH: "{{ self.install_path }}/lib:$PATH" - instructions: | - {{ self.install_dependencies() }} - mkdir -p {{ self.install_path }} - git clone {{ self.repo }} {{ self.install_path }} - cd {{ self.install_path }} - {% if self.version != "master" and self.version != "latest" -%} - git checkout {{ self.version }} - {% endif -%} - python3 configure -nogui - echo "Compiling MRtrix3 ..." - NUMBER_OF_PROCESSORS="{{ self.build_processes }}" python3 build + arguments: + required: + - version + optional: + repo: https://github.com/MRtrix3/mrtrix3.git + install_path: /opt/mrtrix3-{{ self.version }} + build_processes: '1' + dependencies: + apt: + - ca-certificates + - g++ + - gcc + - git + - libeigen3-dev + - make + - python3 + - python3-numpy + - zlib1g-dev + yum: + - eigen3-devel + - gcc-c++ + - git + - make + - numpy + - python3 + - zlib-devel + env: + PATH: '{{ self.install_path }}/bin:$PATH' + LD_LIBRARY_PATH: '{{ self.install_path }}/lib:$PATH' + instructions: | + {{ self.install_dependencies() }} + mkdir -p {{ self.install_path }} + git clone {{ self.repo }} {{ self.install_path }} + cd {{ self.install_path }} + {% if self.version != "master" and self.version != "latest" -%} + git checkout {{ self.version }} + {% endif -%} + python3 configure -nogui + echo "Compiling MRtrix3 ..." + NUMBER_OF_PROCESSORS="{{ self.build_processes }}" python3 build diff --git a/neurodocker/templates/ndfreeze.yaml b/neurodocker/templates/ndfreeze.yaml index 18618b51..1cb65a1d 100644 --- a/neurodocker/templates/ndfreeze.yaml +++ b/neurodocker/templates/ndfreeze.yaml @@ -1,3 +1,4 @@ +--- # Instructions to run `nd_freeze` in NeuroDebian images. name: ndfreeze @@ -5,15 +6,15 @@ url: https://neuro.debian.net/pkgs/neurodebian-freeze.html # not actually source, but we have a choice between binaries and source. Using binaries # requires the urls property. source: - arguments: - required: - - date - optional: - opts: "" + arguments: + required: + - date + optional: + opts: '' # No dependencies because we explicitly install in the instructions. - instructions: | - apt-get update -qq - apt-get install -y -q --no-install-recommends neurodebian-freeze - nd_freeze {{ self.opts }} {{ self.date }} - apt-get clean - rm -rf /var/lib/apt/lists/* + instructions: | + apt-get update -qq + apt-get install -y -q --no-install-recommends neurodebian-freeze + nd_freeze {{ self.opts }} {{ self.date }} + apt-get clean + rm -rf /var/lib/apt/lists/* diff --git a/neurodocker/templates/neurodebian.yaml b/neurodocker/templates/neurodebian.yaml index ad5d642d..64b9f749 100644 --- a/neurodocker/templates/neurodebian.yaml +++ b/neurodocker/templates/neurodebian.yaml @@ -1,36 +1,37 @@ +--- # Instructions to add NeuroDebian repositories. name: neurodebian url: http://neuro.debian.net binaries: - urls: - australia: "http://neuro.debian.net/lists/{{ self.os_codename }}.au.{{ self.full_or_libre }}" - china-tsinghua: "http://neuro.debian.net/lists/{{ self.os_codename }}.cn-bj1.{{ self.full_or_libre }}" - china-scitech: "http://neuro.debian.net/lists/{{ self.os_codename }}.cn-bj2.{{ self.full_or_libre }}" - china-zhejiang: "http://neuro.debian.net/lists/{{ self.os_codename }}.cn-zj.{{ self.full_or_libre }}" - germany-munich: "http://neuro.debian.net/lists/{{ self.os_codename }}.de-m.{{ self.full_or_libre }}" - germany-magdeburg: "http://neuro.debian.net/lists/{{ self.os_codename }}.de-md.{{ self.full_or_libre }}" - greece: "http://neuro.debian.net/lists/{{ self.os_codename }}.gr.{{ self.full_or_libre }}" - japan: "http://neuro.debian.net/lists/{{ self.os_codename }}.jp.{{ self.full_or_libre }}" - usa-ca: "http://neuro.debian.net/lists/{{ self.os_codename }}.us-ca.{{ self.full_or_libre }}" - usa-nh: "http://neuro.debian.net/lists/{{ self.os_codename }}.us-nh.{{ self.full_or_libre }}" - usa-tn: "http://neuro.debian.net/lists/{{ self.os_codename }}.us-tn.{{ self.full_or_libre }}" - arguments: - required: - - version - - os_codename - optional: - full_or_libre: full - dependencies: - apt: - - ca-certificates - - curl - - dirmngr - - gnupg2 - instructions: | - {{ self.install_dependencies() }} - curl -fsSL {{ self.urls[self.version] }} \ - > /etc/apt/sources.list.d/neurodebian.sources.list - curl -sSL https://dl.dropbox.com/s/zxs209o955q6vkg/neurodebian.gpg | apt-key add - - (apt-key adv --refresh-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 || true) - apt-get -qq update + urls: + australia: http://neuro.debian.net/lists/{{ self.os_codename }}.au.{{ self.full_or_libre }} + china-tsinghua: http://neuro.debian.net/lists/{{ self.os_codename }}.cn-bj1.{{ self.full_or_libre }} + china-scitech: http://neuro.debian.net/lists/{{ self.os_codename }}.cn-bj2.{{ self.full_or_libre }} + china-zhejiang: http://neuro.debian.net/lists/{{ self.os_codename }}.cn-zj.{{ self.full_or_libre }} + germany-munich: http://neuro.debian.net/lists/{{ self.os_codename }}.de-m.{{ self.full_or_libre }} + germany-magdeburg: http://neuro.debian.net/lists/{{ self.os_codename }}.de-md.{{ self.full_or_libre }} + greece: http://neuro.debian.net/lists/{{ self.os_codename }}.gr.{{ self.full_or_libre }} + japan: http://neuro.debian.net/lists/{{ self.os_codename }}.jp.{{ self.full_or_libre }} + usa-ca: http://neuro.debian.net/lists/{{ self.os_codename }}.us-ca.{{ self.full_or_libre }} + usa-nh: http://neuro.debian.net/lists/{{ self.os_codename }}.us-nh.{{ self.full_or_libre }} + usa-tn: http://neuro.debian.net/lists/{{ self.os_codename }}.us-tn.{{ self.full_or_libre }} + arguments: + required: + - version + - os_codename + optional: + full_or_libre: full + dependencies: + apt: + - ca-certificates + - curl + - dirmngr + - gnupg2 + instructions: | + {{ self.install_dependencies() }} + curl -fsSL {{ self.urls[self.version] }} \ + > /etc/apt/sources.list.d/neurodebian.sources.list + curl -sSL https://dl.dropbox.com/s/zxs209o955q6vkg/neurodebian.gpg | apt-key add - + (apt-key adv --refresh-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 || true) + apt-get -qq update diff --git a/neurodocker/templates/niftyreg.yaml b/neurodocker/templates/niftyreg.yaml index 54341f02..b5b76883 100644 --- a/neurodocker/templates/niftyreg.yaml +++ b/neurodocker/templates/niftyreg.yaml @@ -1,44 +1,45 @@ +--- # Template for niftyreg. name: niftyreg url: https://github.com/KCL-BMEIS/niftyreg source: - arguments: - required: - - version - optional: - repo: https://github.com/KCL-BMEIS/niftyreg - install_path: /opt/niftyreg-{{ self.version }} - cmake_opts: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF - make_opts: -j1 - dependencies: - apt: - - ca-certificates - - cmake - - g++ - - gcc - - git - - make - yum: - - ca-certificates - - cmake - - gcc-c++ - - git - - make - env: - PATH: "{{ self.install_path }}/bin:$PATH" - LD_LIBRARY_PATH: "{{ self.install_path }}/lib:$LD_LIBRARY_PATH" - instructions: | - {{ self.install_dependencies() }} - mkdir -p /tmp/niftyreg/build - git clone {{ self.repo }} /tmp/niftyreg/source - {% if self.version != "master" and self.version != "latest" -%} - cd /tmp/niftyreg/source - git fetch --tags - git checkout {{ self.version }} - {% endif -%} - cd /tmp/niftyreg/build - cmake {{ self.cmake_opts }} /tmp/niftyreg/source - make {{ self.make_opts }} - make install - ldconfig - rm -rf /tmp/niftyreg + arguments: + required: + - version + optional: + repo: https://github.com/KCL-BMEIS/niftyreg + install_path: /opt/niftyreg-{{ self.version }} + cmake_opts: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF + make_opts: -j1 + dependencies: + apt: + - ca-certificates + - cmake + - g++ + - gcc + - git + - make + yum: + - ca-certificates + - cmake + - gcc-c++ + - git + - make + env: + PATH: '{{ self.install_path }}/bin:$PATH' + LD_LIBRARY_PATH: '{{ self.install_path }}/lib:$LD_LIBRARY_PATH' + instructions: | + {{ self.install_dependencies() }} + mkdir -p /tmp/niftyreg/build + git clone {{ self.repo }} /tmp/niftyreg/source + {% if self.version != "master" and self.version != "latest" -%} + cd /tmp/niftyreg/source + git fetch --tags + git checkout {{ self.version }} + {% endif -%} + cd /tmp/niftyreg/build + cmake {{ self.cmake_opts }} /tmp/niftyreg/source + make {{ self.make_opts }} + make install + ldconfig + rm -rf /tmp/niftyreg diff --git a/neurodocker/templates/petpvc.yaml b/neurodocker/templates/petpvc.yaml index 4d5b42b5..12232f32 100644 --- a/neurodocker/templates/petpvc.yaml +++ b/neurodocker/templates/petpvc.yaml @@ -1,32 +1,33 @@ +--- # Instructions to install PETPVC. name: petpvc url: https://github.com/UCL/PETPVC binaries: - arguments: - required: - - version - optional: - install_path: /opt/petpvc-{{ self.version }} - dependencies: - apt: - - ca-certificates - - curl - yum: - - curl - urls: - "1.2.4": https://github.com/UCL/PETPVC/releases/download/v1.2.4/PETPVC-1.2.4-Linux.tar.gz - "1.2.2": https://github.com/UCL/PETPVC/releases/download/v1.2.2/PETPVC-1.2.2-Linux.tar.gz - "1.2.1": https://github.com/UCL/PETPVC/releases/download/v1.2.1/PETPVC-1.2.1-Linux.tar.gz - "1.2.0-b": https://github.com/UCL/PETPVC/releases/download/v1.2.0-b/PETPVC-1.2.0-b-Linux.tar.gz - "1.2.0-a": https://github.com/UCL/PETPVC/releases/download/v1.2.0-a/PETPVC-1.2.0-a-Linux.tar.gz - "1.1.0": https://github.com/UCL/PETPVC/releases/download/v1.1.0/PETPVC-1.1.0-Linux.tar.gz - "1.0.0": https://github.com/UCL/PETPVC/releases/download/v1.0.0/PETPVC-1.0.0-Linux.tar.gz - env: - PATH: "{{ self.install_path }}/bin:$PATH" - instructions: | - {{ self.install_dependencies() }} - echo "Downloading PETPVC ..." - mkdir -p {{ self.install_path }} - curl -fL {{ self.urls[self.version] }} \ - | tar -xz -C {{ self.install_path }} --strip-components 1 + arguments: + required: + - version + optional: + install_path: /opt/petpvc-{{ self.version }} + dependencies: + apt: + - ca-certificates + - curl + yum: + - curl + urls: + 1.2.4: https://github.com/UCL/PETPVC/releases/download/v1.2.4/PETPVC-1.2.4-Linux.tar.gz + 1.2.2: https://github.com/UCL/PETPVC/releases/download/v1.2.2/PETPVC-1.2.2-Linux.tar.gz + 1.2.1: https://github.com/UCL/PETPVC/releases/download/v1.2.1/PETPVC-1.2.1-Linux.tar.gz + 1.2.0-b: https://github.com/UCL/PETPVC/releases/download/v1.2.0-b/PETPVC-1.2.0-b-Linux.tar.gz + 1.2.0-a: https://github.com/UCL/PETPVC/releases/download/v1.2.0-a/PETPVC-1.2.0-a-Linux.tar.gz + 1.1.0: https://github.com/UCL/PETPVC/releases/download/v1.1.0/PETPVC-1.1.0-Linux.tar.gz + 1.0.0: https://github.com/UCL/PETPVC/releases/download/v1.0.0/PETPVC-1.0.0-Linux.tar.gz + env: + PATH: '{{ self.install_path }}/bin:$PATH' + instructions: | + {{ self.install_dependencies() }} + echo "Downloading PETPVC ..." + mkdir -p {{ self.install_path }} + curl -fL {{ self.urls[self.version] }} \ + | tar -xz -C {{ self.install_path }} --strip-components 1 diff --git a/neurodocker/templates/spm12.yaml b/neurodocker/templates/spm12.yaml index 78b2cae7..cf4385df 100644 --- a/neurodocker/templates/spm12.yaml +++ b/neurodocker/templates/spm12.yaml @@ -1,3 +1,4 @@ +--- # Instructions to install SPM. # # Documentation: https://www.fil.ion.ucl.ac.uk/spm/doc/ @@ -5,71 +6,72 @@ name: spm12 url: https://www.fil.ion.ucl.ac.uk/spm/ binaries: - arguments: - required: - - version - optional: - install_path: /opt/spm12-{{ self.version }} - matlab_install_path: /opt/matlab-compiler-runtime-2010a - urls: + arguments: + required: + - version + optional: + install_path: /opt/spm12-{{ self.version }} + matlab_install_path: /opt/matlab-compiler-runtime-2010a + urls: # Dev URL uses 2020a matlab compiler runtime, which we do not support yet. # dev: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_latest_Linux_R2010a.zip - r7771: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip - r7487: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7487_R2010a.zip - r7219: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip - r6914: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6914_R2010a.zip - r6685: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6685_R2010a.zip - r6472: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6472_R2010a.zip - r6225: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6225_R2010a.zip - dependencies: - apt: - - ca-certificates - - curl - - unzip + r7771: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7771_R2010a.zip + r7487: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7487_R2010a.zip + r7219: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip + r6914: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6914_R2010a.zip + r6685: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6685_R2010a.zip + r6472: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6472_R2010a.zip + r6225: https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r6225_R2010a.zip + dependencies: + apt: + - ca-certificates + - curl + - unzip # for matlab compiler runtime 2010a - - bc - - libncurses5 - - libxext6 - - libxmu6 - - libxpm-dev - - libxt6 - - multiarch-support - debs: - - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb - yum: - - curl - - unzip + - bc + - libncurses5 + - libxext6 + - libxmu6 + - libxpm-dev + - libxt6 + - multiarch-support + debs: + - http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb + yum: + - curl + - unzip # for matlab compiler runtime 2010a - - bc - - libXext - - libXmu - - libXpm - - libXt - env: - FORCE_SPMMCR: "1" - SPM_HTML_BROWSER: "0" - SPMMCRCMD: "{{ self.install_path }}/run_spm12.sh {{ self.matlab_install_path }}/v713 script" + - bc + - libXext + - libXmu + - libXpm + - libXt + env: + FORCE_SPMMCR: '1' + SPM_HTML_BROWSER: '0' + SPMMCRCMD: '{{ self.install_path }}/run_spm12.sh {{ self.matlab_install_path }}/v713 script' # matlab compiler runtime variables - LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:{{ self.matlab_install_path }}/v713/runtime/glnxa64:{{ self.matlab_install_path }}/v713/bin/glnxa64:{{ self.matlab_install_path }}/v713/sys/os/glnxa64:{{ self.matlab_install_path }}/v713/extern/bin/glnxa64" - MATLABCMD: "{{ self.matlab_install_path }}/v713/toolbox/matlab" + LD_LIBRARY_PATH: $LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:{{ self.matlab_install_path }}/v713/runtime/glnxa64:{{ self.matlab_install_path }}/v713/bin/glnxa64:{{ + self.matlab_install_path }}/v713/sys/os/glnxa64:{{ self.matlab_install_path }}/v713/extern/bin/glnxa64 + MATLABCMD: '{{ self.matlab_install_path }}/v713/toolbox/matlab' - instructions: | - export TMPDIR="$(mktemp -d)" - {{ self.install_dependencies() }} - echo "Downloading MATLAB Compiler Runtime ..." - curl -fL -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin - chmod +x "$TMPDIR/MCRInstaller.bin" - "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="{{ self.matlab_install_path }}" - rm -rf "$TMPDIR" - unset TMPDIR - # Install spm12 - echo "Downloading standalone SPM12 ..." - curl -fL -o /tmp/spm12.zip {{ self.urls[self.version] }} - unzip -q /tmp/spm12.zip -d /tmp - mkdir -p {{ self.install_path }} - mv /tmp/spm12/* {{ self.install_path }}/ - chmod -R 777 {{ self.install_path }} - rm -rf /tmp/spm* - # Test - {{ self.install_path }}/run_spm12.sh {{ self.matlab_install_path }}/v713 quit + instructions: | + export TMPDIR="$(mktemp -d)" + {{ self.install_dependencies() }} + echo "Downloading MATLAB Compiler Runtime ..." + curl -fL -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin + chmod +x "$TMPDIR/MCRInstaller.bin" + "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="{{ self.matlab_install_path }}" + rm -rf "$TMPDIR" + unset TMPDIR + # Install spm12 + echo "Downloading standalone SPM12 ..." + curl -fL -o /tmp/spm12.zip {{ self.urls[self.version] }} + unzip -q /tmp/spm12.zip -d /tmp + mkdir -p {{ self.install_path }} + mv /tmp/spm12/* {{ self.install_path }}/ + chmod -R 777 {{ self.install_path }} + rm -rf /tmp/spm* + # Test + {{ self.install_path }}/run_spm12.sh {{ self.matlab_install_path }}/v713 quit diff --git a/neurodocker/templates/vnc.yaml b/neurodocker/templates/vnc.yaml index deee1ac8..e8eb2201 100644 --- a/neurodocker/templates/vnc.yaml +++ b/neurodocker/templates/vnc.yaml @@ -1,3 +1,4 @@ +--- # Instructions to configure VNC. # # Run: @@ -6,23 +7,23 @@ name: vnc url: https://www.realvnc.com/ # Not actually source, but we do not want to provide binaries. source: - arguments: - required: - - passwd - dependencies: - apt: - - openbox - - tightvncserver - - xfonts-base - - xvfb - yum: - - openbox - - tightvnc-server - - xorg-x11-fonts - - xorg-x11-server-Xvfb - instructions: | - {{ self.install_dependencies() }} - echo 'Configuring VNC password ...' - mkdir -p ~/.vnc - echo {{ self.passwd }} | vncpasswd -f > ~/.vnc/passwd - chmod 0600 ~/.vnc/passwd + arguments: + required: + - passwd + dependencies: + apt: + - openbox + - tightvncserver + - xfonts-base + - xvfb + yum: + - openbox + - tightvnc-server + - xorg-x11-fonts + - xorg-x11-server-Xvfb + instructions: | + {{ self.install_dependencies() }} + echo 'Configuring VNC password ...' + mkdir -p ~/.vnc + echo {{ self.passwd }} | vncpasswd -f > ~/.vnc/passwd + chmod 0600 ~/.vnc/passwd diff --git a/pyproject.toml b/pyproject.toml index 6d3d6e6c..6b9e82e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,12 @@ +[tool.black] +line-length = 88 +target-version = ['py38'] + +[tool.codespell] +# didi -- some name Dear to someone +ignore-words-list = "didi" +skip = ".git,*.pdf,*.svg,versioneer.py,neurodocker/_version.py" + [tool.isort] combine_as_imports = true line_length = 88 @@ -7,3 +16,23 @@ src_paths = [ 'neurodocker', 'docs' ] + +[tool.mypy] +no_implicit_optional = false + +[[tool.mypy.overrides]] +ignore_missing_imports = true +module = [ + "pytest", + "docker", + "jsonschema" +] + +[[tool.mypy.overrides]] +ignore_errors = true +module = [ + 'neurodocker._version', + "neurodocker.reproenv.tests.*", + 'download_templates', + 'conf' +] diff --git a/setup.cfg b/setup.cfg index b2b7abf6..682db557 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,11 +41,7 @@ minify = docker >= 4.4.1 dev = %(minify)s - black >= 23.1.0 - isort codecov - flake8 - mypy pre-commit pytest >= 6.0 pytest-cov >= 2.0.0 @@ -83,25 +79,6 @@ max-line-length = 88 extend-ignore = E203 exclude = neurodocker/_version.py -[mypy] -exclude = reproenv/tests -no_implicit_optional=False - -[mypy-neurodocker._version] -ignore_errors = True - -[mypy-neurodocker.reproenv.tests.*] -ignore_errors = True - -[mypy-pytest] -ignore_missing_imports = True - -[mypy-docker] -ignore_missing_imports = True - -[mypy-jsonschema] -ignore_missing_imports = True - [tool:pytest] addopts = --cov=neurodocker --cov-config=setup.cfg --verbose --strict-markers markers =