Nextflow+Docker: No such file or directory, even though file exists

112 Views Asked by At

I am trying to run a nextflow pipeline inside a docker container. Out of necessity I mounted the socket of docker as a docker volume. This is my docker compose file:

pipeline:
    build:
      dockerfile: ./docker/pipeline/dockerfile
    volumes:
      - ./nextflow:/home/app/nextflow
      - ./data:/home/app/data
      - /var/run/docker.sock:/var/run/docker.sock

In this way nextflow inside the container can download all docker images to run the pipeline.

When I run a nextflow pipeline, i.e. nf-core/sarek, after a while and after some downloaded docker images it gives me the following error:

Command exit status:
  127

Command output:
  (empty)

Command error:
  /bin/bash: .command.run: No such file or directory

Work dir:
  /home/app/nextflow/work/e5/83f1be41789e7aa1f5b7fbc19851fc

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

If I enter inside the container, the file .command.run exists in the path provided by the message, i.e. /home/app/nextflow/work/e5/83f1be41789e7aa1f5b7fbc19851fc!

If I try to run bash .command.run inside of it, I get the same error message:

/bin/bash: /home/app/nextflow/work/e5/83f1be41789e7aa1f5b7fbc19851fc/.command.run: No such file or directory

This is the dockerfile I use:

FROM nextflow/nextflow:23.11.0-edge

RUN yum install -y python3 python3-pip python3-devel gcc openssl-devel libffi-devel python3-setuptools

RUN mkdir -p /home/app
COPY docker/pipeline /home/app

WORKDIR /home/app

RUN pip3 install -r requirements.txt

CMD ["gunicorn", "-b", "0.0.0.0:5000", "main:app"]
0

There are 0 best solutions below