Skip to content
Snippets Groups Projects
Dario Bosch's avatar
Dario Bosch authored
3d219e0a
History
Name Last commit Last update
.gitignore
README.md
dlAndRun.sh
makeBin.sh

Neurocontainers wrapper script for nyx

by Dario Bosch dario.bosch@tuebingen.mpg.de 2025

Description

You want to run the tools from neurodesk / neurocontainers? This set of scripts will make it easy to do so.

After setting it up, you can for example run mrview from mrtrix3_3.0.4_20240320 by running this command in a command line: mrtrix3_3.0.4_20240320 mrview

Installation

Right now everything has to be installed in /home/$USER/neurocontainers. This might be improved in a future version. The containers will be downloaded into /ptmp/$USER/neurocontainers. This path is also hard-coded for now.

To install, navigate to your home directory and clone this repository:

cd $HOME
git clone "https://gitlab.tuebingen.mpg.de/dbosch/neurocontainers"

Now open $HOME/.bashrc, for example with the nano command, and add the following lines to the end:

neurocontainers() {
  pth=/home/$USER/neurocontainers/bin
  if [ -d "$pth" ]; then
    if [[ ":$PATH:" != *":$pth:"* ]]; then
      export PATH="$pth:$PATH"
    fi
  else
    echo "Directory does not exist"
  fi
}

In nano, you can save with CTRL+O and Enter. you can then exit nano with CTRL+X

Restart your terminal and you should be done.

Update container index

This has to be done before the first run, and whenever you want to load new containers from the index

  1. Navigate to /home/$USER/neurocontainers
  2. run the makeBin.sh script: ./makeBin.sh

Usage

Whenever you want to use the containers, open a terminal and type neurocontainers. This will add the necessary scripts to your $PATH automatically. you can see a list of all available containers with

ls /home/$USER/neurocontainers/bin

For running a tool from a container, specify the container name, then the tool: fsl_6.0.7.14_20241018 fsl

You can also pass command line parameters: mrtrix3_3.0.4_20240320 mrview /path/to/dicoms

If you want to enter the container and interact, you can also start a bash in it: fsl_6.0.7.14_20241018 bash