This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

Path to the data folder

The first step when developing an App is to run it locally.

The App being developed is located at /network/lustre/iss01/home/aurore.bussalb/Repositories/app-maxfilter and the MEG and calibration files read by this App are located at /network/lustre/iss01/cenir/analyse/meeg/BRAINLIFE/aurore/data_for_test/.

  • First, the App was run in a Python virtual environment with the MNE version specified inside the requirements.txt file

  • Second, it was run outside the Python virtual environment with the command singularity exec docker://brainlife/mne:0.19.2 python3 maxfilter.py

But an error occurred during the second step:

FileNotFoundError: [Errno 2] No such file or directory: '/network/lustre/iss01/cenir/analyse/meeg/BRAINLIFE/aurore/data_for_test/rest1-raw.fif'

So we investigated it by testing different configurations:

 

Run App in Python Virtual environment

Run App with Brainlife/mne Docker container

 

Run App in Python Virtual environment

Run App with Brainlife/mne Docker container

version of MNE: 0.19

FileNotFoundError when the file to read is not located at /network/lustre/iss01/home/aurore.bussalb/

FileNotFoundError when the file to read is not located at /network/lustre/iss01/home/aurore.bussalb/

version of MNE:0.22

The file can be read even if it’s located at network/lustre/iss01/cenir/analyse/meeg/BRAINLIFE/aurore/data_for_test/

FileNotFoundError when the file to read is not located at /network/lustre/iss01/home/aurore.bussalb/

So, whatever the version of MNE installed in the Brainlife/mne Docker container, if the file to read is not located at /network/lustre/iss01/home/aurore.bussalb/ (but no need for it to be exactly in the folder where the executable file is), it can’t be found.

This problem is solved by telling Singularity to look at the data folder:

singularity exec -e -B /network/lustre/iss01/cenir/analyse/meeg/BRAINLIFE/aurore/data_for_test:/input docker://brainlife/mne:0.22.0 python3 maxfilter.py .

The data folder /network/lustre/iss01/cenir/analyse/meeg/BRAINLIFE/aurore/data_for_test/ was mounted thanks to the -B flag. In the config.json.example, the input file must be referred as /input/rest1-raw.fif.

So to test an App locally, the data folder must be mounted. Nevertheless, when registering the App on Brainlife the command in the main file must be:

singularity exec docker://brainlife/mne:0.22.0 python3 maxfilter.py