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

Bind files/directories into containers? #93

Open
effigies opened this issue Apr 19, 2023 · 5 comments
Open

Bind files/directories into containers? #93

effigies opened this issue Apr 19, 2023 · 5 comments
Labels
question Further information is requested

Comments

@effigies
Copy link

It seems the command for running containers is in https://github.com/ReproNim/containers/blob/master/.datalad/config

Is there a way to add arguments like -B /my/patch:/patched/location?

Not sure if this belongs in reproman...

@yarikoptic
Copy link
Member

It seems the command for running containers is in https://github.com/ReproNim/containers/blob/master/.datalad/config

correct!

Is there a way to add arguments like -B /my/patch:/patched/location?

yes -- modify that file or if for some reason you need to apply it systematically for all containers -- https://github.com/ReproNim/containers/blob/master/scripts/singularity_cmd#L104 itself.

If config file -- then better make use of recently added in #88 functionality to "copy" definition into corresponding super-dataset, and adjust there. That usage already presented in https://github.com/ReproNim/containers#runnable-script and adjusted details docs are coming (#90 attn @asmacdo).

But could you tell me more about your use case?

Note that binding of "external" to dataset paths is generally "ill-advised" since would violate YODA principles. That is why the https://github.com/ReproNim/containers/blob/master/scripts/singularity_cmd binds everything only under current dataset.

Not sure if this belongs in reproman...

who knows... it might ;)

@yarikoptic yarikoptic added the question Further information is requested label Apr 19, 2023
@effigies
Copy link
Author

We have a weird bug where SVD is failing on an image affine in an MRIQC run, but I can't reproduce it locally. I want to just patch the nibabel module to catch the exception and provide a more informative error (what was the affine that failed?) without going through the process of making a release or otherwise building a custom image. The idea would be to include the patched file inside <dataset>/code/ so it would be reproducible if weird.

@yarikoptic
Copy link
Member

So why don't you start with that target - placing patched code under <dataset>/code which should be visible under that path within the container?

@effigies
Copy link
Author

Hmm. I suppose I could put a whole patched nibabel in and add it to PYTHONPATH.

@yarikoptic
Copy link
Member

you could. Also don't forget about possibility for submodules so you could just have just a patched branch of the nibabel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants