Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize local DataProvider bindmounts for apptainer tasks #1394

Open
prioux opened this issue May 17, 2024 · 0 comments · May be fixed by #1401
Open

Optimize local DataProvider bindmounts for apptainer tasks #1394

prioux opened this issue May 17, 2024 · 0 comments · May be fixed by #1401
Assignees
Labels
Admin Features or bugs related to administrative features Apptainer Enhancement Priority: Normal

Comments

@prioux
Copy link
Member

prioux commented May 17, 2024

When tasks are run in apptainer, the container's launch command is extended with a bunch of -B options to mount all the local data providers found on the target system. This means sometimes, we mount folders that are not even necessary for the job.

An example of that, as seen in the .science.TOOL script, was this long line:

   -B /mnt/nfs/mainstore/MainStore
   -B /mnt/nfs/mainstore/NeuroHubStore
   -B /mnt/nfs/neurohub/CONP-Datasets/BigBrain_3DClassifiedVolumes
   -B /mnt/nfs/neurohub/CONP-Datasets/BigBrain_3DSurfaces
   -B /mnt/nfs/neurohub/CONP-Datasets/BigBrain_Flat
   -B /mnt/nfs/neurohub/CONP-Datasets/preventad-open
   -B /mnt/nfs/neurohub/CONP-Datasets/preventad-open-bids/BIDS_dataset
   -B /mnt/nfs/neurohub/CONP-Datasets/visual-working-memory
   -B /mnt/nfs/neurohub/UKBB-Civet-Datasets
   -B /mnt/nfs/sftp/proftpd-1
   -B /mnt/nfs/sftp/proftpd-2

(reformatted on multiple lines for clarity).

A better mechanism would be to only mount a folder for a DP if there is at least one input file for the task on that particular DP.

We could also consider mounting these local DPs in "read-only" mode. Tasks aren't supposed to modify any of their input files, generally. There is a flag at the ToolConfig level that indicates this anyway, so the value of the flag coudl be used to determine if we mount them read-only.

@prioux prioux added Enhancement Priority: Normal Apptainer Admin Features or bugs related to administrative features labels May 17, 2024
@MontrealSergiy MontrealSergiy self-assigned this May 23, 2024
@MontrealSergiy MontrealSergiy linked a pull request Jul 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Features or bugs related to administrative features Apptainer Enhancement Priority: Normal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants