I need to access a file that is in `/opt/conda/pkg...
# modules
c
I need to access a file that is in
/opt/conda/pkgs/pillow-11.1.0-py313h8db990d_0/info/test/Tests/fonts/FreeMono.ttf
in the Docker and Singularity images, but apparently it is elsewhere when using the conda runner. I have never used conda directly. How can I find the path to that file ? (context: https://github.com/nf-core/modules/pull/7404).
l
The file should be located at:
Copy code
<conda-base-dir>/pkgs/pillow-11.1.0-py313h8db990d_0/info/test/Tests/fonts/FreeMono.ttf
You could try to get the base directory using:
Copy code
CONDA_BASE=$(conda info --base)
Then, reference the file with:
Copy code
last-dotplot -f ${CONDA_BASE}/pkgs/pillow-11.1.0-py313h8db990d_0/info/test/Tests/fonts/FreeMono.ttf
However, I'm not sure if using the absolute path is the best approach to integrate the font, whether with conda or containers. Maybe there is a nicer way, but I'm not aware of any.
It might also be good to fix the version of
pillow
in the
environment.yml
. If conda for whatever reason decides to solve this environment with a different version of
pillow
, the path will change and it will fail.
c
Is there a way I can inspect a conda installation on a failed run on GitHub? I can not run it locally as my university's lawyers have asked us to stop using conda since its license debacle… I am still struggling to find fonts on a conda install. I switched to use open-fonts; on Singularity it drops them at a stable path such as
/opt/conda/fonts/open-fonts/DejaVuSansMono-Regular.ttf
. On conda I have no idea where to find them… (I tried
/home/ubuntu/miniconda3/conda/fonts/open-fonts/DejaVuSansMono-Regular.ttf
but it failed). Also the CONDA_BASE trick above did not work in my hands.
f
Maybe you can try running gitpod? It should have conda available and you should be able to see the paths I think.
☝️ 2
c
Thanks @Famke Bäuerle for the suggestion. Fortunately I finally found the file by adding a
find /
command in the module script to first report the font location, and then replacing the command by its result.
nf core party 1
f
perfect 👍