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

Is it possible to not hardcode HOME in Dockerfile? #1307

Open
yarikoptic opened this issue Jul 9, 2024 · 3 comments
Open

Is it possible to not hardcode HOME in Dockerfile? #1307

yarikoptic opened this issue Jul 9, 2024 · 3 comments

Comments

@yarikoptic
Copy link
Contributor

ATM https://github.com/nipreps/mriqc/blob/master/Dockerfile#L164

ENV HOME="/home/mriqc"

which then gets inherited also within singularity container we convert docker container into in https://github.com/ReproNim/containers so it is "hardcoded" even if I would run in singularity with current user, and thus having no /home/mriqc. As a result we get

>      File "/opt/conda/lib/python3.11/pathlib.py", line 1116, in mkdir
>        os.mkdir(self, mode)
>    OSError: [Errno 30] Read-only file system: '/home/mriqc/.cache'
@oesteban
Copy link
Member

Is it not possible to bind some writeable filesystem into /home/mriqc?

@yarikoptic
Copy link
Contributor Author

it is possible as a workaround and that is what I recommended in poldracklab/tacc-openneuro#86 (comment) and I believe tried/used. But that is not a generic "solution" for https://github.com/ReproNim/containers since it requires this app+version specific knowledge of needing such a workaround.

@asmacdo
Copy link

asmacdo commented Oct 23, 2024

I was able to work around this problem by adding --no-datalad-get to the mriqc args. That does require running datalad get outside of the container.

So I think the problem is that if the MRIQC Dockerfile sets HOME, that will break datalad integration when the container is run with apptainer.

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

No branches or pull requests

3 participants