Setting up FastrPI#

Before FastrPI can be used, some things need to be set up. In this document these steps are described.

Git#

FastrPI uses Git and GitLab as a backend, so Git (>=1.7.0) needs to be installed. Your username and email should also be configured. If your name was “John Doe” and your email was “johndoe@example.com”, this could be configured by running

git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Adjust these commands to reflect your own situation. No further knowledge of Git is required to use FastrPI.

Fastr#

To use FastrPI currently a development version of Fastr is needed. This version can be installed by cloning the feature/fastrpi branch from the Fastr repository:

git clone --branch feature/fastrpi git@gitlab.com:radiology/infrastructure/fastr.git
cd fastr
pip install .

FastrPI#

To install FastrPI run:

git clone git@gitlab.com:radiology/infrastructure/resources/fastrpi/fastrpi.git
cd fastrpi
pip install .

After installing run fastrpi init and follow the instructions on the screen to configure your setup. In order to use the public FastrPI repositories and follow the tutorial no credentials need to be set up. For the use of the private repositories and/or to publish packages, follow the next section ‘GitLab’.

For more information on the configuration of FastrPI, see Configuration and more information on the Fastr config file, can be found here.

GitLab#

The FastrPI repository itself is stored as a private GitLab repository. To connect to this repository over SSH, you need to set up an SSH key. The GitLab documentation gives instruction on how to generate an SSH key if necessary and to add this key to your GitLab account.

To publish to the repository an Access Token is needed to read the API. To generate a token, see the GitLab documentation.

Fastr needs to be configured to specify which of the Targets (DockerTarget or SingularityTarget) needs to be used during the execution of the Networks. This can be configured in the config file, by default set to ~/.fastr/config.py, by setting preferred_target to

preferred_target = "DockerTarget" # For DockerTargets

for the use of Docker, or to use Singularity set

preferred_target = "SingularityTarget" # For SingularityTargets

The preferred_target needs to be compatible with the container_type setting in the FastrPI configuration file.