2.1. Using Docker¶
2.1.1. Install Docker¶
If you have not yet installed Docker, install Docker from here. Docker is available on all platforms. For Linux, you may have to perform additional post-installation steps.
2.1.2. Pulling pre-built Docker image¶
After installing Docker, you can directly pull the BrainSuite BIDS App from the Docker Hub repository by running the following command in the terminal:
docker pull bids/brainsuite:v21a
The above command will pull all layers of the Docker image (15 GB total) and may take a while depending on your download speed.
2.1.3. Building from source¶
To build from source (not recommended due to constantly changing third party repos), you can clone our BrainSuite BIDS App Github repo by running:
git clone https://github.com/bids-apps/BrainSuite.git cd BrainSuite docker build -t brainsuite .
brainsuite is modifiable and is the name used for the Docker image that will be built.
2.2. Using Singularity¶
Converting the Docker version of BrainSuite BIDS App to Singularity is optional but is often required for multi-user systems with shared resources due to security reasons. Docker requires admin privileges, which can pose risks and Singularity handles this this issue by restricting escalated privileges.
2.2.1. Converting Docker image to Singularity image¶
Define the directory where you want to store the Singularity-converted image:
Define the name of the built BrainSuite BIDS App image. If you have pulled the pre-built version from Docker Hub, then you can run:
However, if you have built it from the source, you will set
$CMD with the name you have given it.
Now, using Docker, you will convert the Docker version of the BrainSuite BIDS App by running the following in the terminal:
docker run -v /var/run/docker.sock:/var/run/docker.sock \ -v $outputDirectory:/output \ --privileged -t --rm \ quay.io/singularity/docker2singularity \ $CMD
This may take a while and will create a 5.3 GB image.