1

I have the following Docker recipe which works fine with Docker:

FROM mambaorg/micromamba:1-noble
LABEL maintainer="[email protected]"
RUN micromamba install -y -n base -c bioconda -c conda-forge fastQC
RUN micromamba clean --all --yes
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/conda/bin

If I build it and run it with Docker it works fine

docker build -t test .
docker tag test:latest rbarrant/test:0.1
docker push rbarrant/test:0.1

docker run rbarrant/test:0.1 fastqc --help

But with singularity it complains:

singularity exec docker://rbarrant/test:0.1 fastqc

INFO: Using cached SIF image Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/local/lib/site_perl) at /opt/conda/bin/fastqc line 4. BEGIN failed--compilation aborted at /opt/conda/bin/fastqc line 4.

What am I missing?

2
  • Added an answer. Did you try to install perl with the command below? Commented Oct 22, 2024 at 10:25
  • I did, no success. This works with docker but not with singularity. Commented Oct 22, 2024 at 14:00

2 Answers 2

1

I got it, just need to add PERL5LIB as an environment variable.

ENV PERL5LIB=/opt/conda/lib/perl5/core_perl/

Again, this is not needed for Docker, but it is for singularity. Hence the recipe would be:

FROM mambaorg/micromamba:1-noble
LABEL maintainer="[email protected]"
RUN micromamba install -y -n base -c bioconda -c conda-forge fastQC
ENV PERL5LIB=/opt/conda/lib/perl5/core_perl/
RUN micromamba clean --all --yes
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/conda/bin
Sign up to request clarification or add additional context in comments.

Comments

0

Try to add the line below to your Dockerfile, it will install perl:

RUN micromamba install -y -n base -c conda-forge perl

1 Comment

The problem isn't perl? I did this and I got the same error. I think it has to do with where it is looking for libraries, otherwise, why would it work with docker but not with singularity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.