BioContainers / containers

Bioinformatics containers
http://biocontainers.pro
Apache License 2.0
674 stars 246 forks source link

diann:v1.8.1_cv1 - std::runtime_error #554

Closed maff1 closed 7 months ago

maff1 commented 7 months ago

Hi,

I'm using Apptainer (formely Singularity) to build an image, SIF on my local Linux machine to then move it and run on HPC.

SIF file build:

apptainer build diann.sif docker://biocontainers/diann:v1.8.1_cv1

Then running with

apptainer run diann.sif diann -h

Returns terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Aborted (core dumped)

apptainer distro
1.2.5 Ubuntu 22.04.3 LTS

I also tried to build an image from Dockerfile as suggested in the accepted answer in the thread: https://stackoverflow.com/questions/60314664/how-to-build-singularity-container-from-dockerfile

Any suggestions to sort out this issue?

maff1 commented 7 months ago

Adding export LC_ALL=C seems to solve.

apptainer shell diann.sif
export LC_ALL=C
diann -h

Returns the desired output

DIA-NN 1.8.1 (Data-Independent Acquisition by Neural Networks)
Compiled on Apr 15 2022 08:45:18
Current date and time: Tue Jan 16 14:51:56 2024
Logical CPU cores: 20
mboudet commented 7 months ago

Yes, it seems to work fine as a Docker container, but a singularity there seems to be some locale issues, since singularity does not have writing permission to setup properly.

We should probably install some packages in the Dockerfile regarding this.

Meanwhile, you can run your command with apptainer run with something like

apptainer run diann.sif bash -c "export LC_ALL=C && diann"

ypriverol commented 7 months ago

I use diann sif container in production with singularity and no problems so far, this is the URL of the container that Im using:

https://containers.biocontainers.pro/s3/SingImgsRepo/diann/v1.8.1_cv1/diann_v1.8.1_cv1.img
mboudet commented 7 months ago

Alright, I pushed a cv2 which should fix the issue.

It is available as a docker with "biocontainers/diann:1.8.1_cv2", and as a ready-made sif file here :

https://containers.biocontainers.pro/s3/SingImgsRepo/diann/1.8.1_cv2/diann_1.8.1_cv2.sif

(Also I realised that I commented on the related issue instead of this one, sorry about that).