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

Warning in output: Set MPLCONFIGDIR when running bids-mriqc #83

Open
asmacdo opened this issue Feb 7, 2023 · 4 comments
Open

Warning in output: Set MPLCONFIGDIR when running bids-mriqc #83

asmacdo opened this issue Feb 7, 2023 · 4 comments

Comments

@asmacdo
Copy link
Member

asmacdo commented Feb 7, 2023

Matplotlib expects a config/cache dir at /home/mriqc/.config/matplotlib There is no failure, because something (at least in mriqc 22.0.6) creates a directory in /tmp.

If we have a way to create a directory and set this envvar to it, matplotlib will apparently have better performance.

Matplotlib created a temporary config/cache directory at /tmp/matplotlib-hotj8pb8 because the default path (/home/mriqc/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
@yarikoptic
Copy link
Member

"interesting" since in principle we do provide a HOME directory at https://github.com/ReproNim/containers/blob/master/scripts/singularity_cmd#L104 and it is writeable. But here specifically (didn't try/look inside) we are talking about /home/mriqc user home, whenever I believe actual HOME for that session might be somewhere else -- worth looking into. Before that -- to make sure, did you use that container via that singularity_cmd or directly via singularity?

@asmacdo
Copy link
Member Author

asmacdo commented Feb 7, 2023

I was using datalad and singularity_cmd.

I added an echo to the datalad containers-run

$ datalad containers-run --explicit --container-name containers/bids-mriqc --input sourcedata --output out '{inputs}' '{outputs}' participant group -w workdir
[INFO   ] Making sure inputs are available (this may take some time) 
[INFO   ] == Command start (output follows) ===== 
singularity run -W /tmp/singtmp.v4PBw8 -B /home/vagrant/DEMO/ds000003-qc/containers/binds/zoneinfo/UTC:/etc/localtime -B /tmp/singtmp.v4PBw8/tmp:/tmp -B /tmp/singtmp.v4PBw8/var/tmp:/var/tmp -e -B /home/vagrant/DEMO/ds000003-qc -H /home/vagrant/DEMO/ds000003-qc/containers/binds/HOME --pwd /home/vagrant/DEMO/ds000003-qc containers/images/bids/bids-mriqc--22.0.6.sing sourcedata out participant group -w workdir

@asmacdo
Copy link
Member Author

asmacdo commented Feb 7, 2023

(repronim-venv) vagrant@ubuntu2204:~/DEMO/ds000003-qc/containers/binds/HOME$ ls -lah

total 24K
drwxrwxr-x 2 vagrant vagrant 4.0K Feb  3 19:12 .
drwxrwxr-x 4 vagrant vagrant 4.0K Feb  3 18:57 ..
-rw-rw-r-- 1 vagrant vagrant 1.4K Feb  3 18:57 .bashrc
-rw-rw-r-- 1 vagrant vagrant   60 Feb  3 19:12 .gitconfig
-rw-rw-r-- 1 vagrant vagrant   24 Feb  3 18:57 .gitignore
-rw-rw-r-- 1 vagrant vagrant  709 Feb  3 18:57 README.md

@yarikoptic
Copy link
Member

did quick check and I think that may be -H isn't really enough on its own to really establish new "HOME" inside the container... need to check more in detail later.

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

2 participants