Closed ajpar94 closed 10 months ago
Hi @ajpar94,
Thanks for raising this.
I think it would be much easier to run StellarPGx with Docker vs within Docker. You don't need to be inside any container. Simply provide the following in the nextflow.config file:
nextflow.config
file -- under the process stanza
), i.e. uncomment the line Docker stanza
in the nextflow.config file)Afterwards, you can run StellarPGx on your normal command line. Be sure to check that the Docker daemon is running.
Running StellarPGx with Docker works perfectly fine. However, I would like to run it as part of a kubernetes cluster and therefore it would be ideal to have it all in one docker container.
@ajpar94,
Thanks. If you try to run Nextflow from inside a Docker container, your paths and directories are not what you normally see. Therefore, the easiest way is to run StellarPGx with Docker.
Unfortunately, we don't have a Kubernetes cluster that we can test any changes that would need to be made for your particular use case.
@ajpar94, Could you try merging the component tools of our Docker container with your existing container or Dockerfile? In this way, you'll only be dealing with one Dockerfile. Be sure to update the path in your nextflow.config to point to the merged container.
Since you've already pulled the StellarPGx container, you can add the following to your Dockerfile:
WORKDIR /
COPY --from=twesigomwedavid/stellarpgx-dev /usr/local/bin/tabix /usr/local/bin/
COPY --from=twesigomwedavid/stellarpgx-dev /usr/local/bin/bgzip /usr/local/bin/
COPY --from=twesigomwedavid/stellarpgx-dev /usr/local/bin/bcftools /usr/local/bin/
COPY --from=twesigomwedavid/stellarpgx-dev /usr/local/bin/samtools /usr/local/bin/
COPY --from=twesigomwedavid/stellarpgx-dev /usr/local/bin/graphtyper /usr/local/bin/graphtyper
I see you already have Python3 in one of your lines.
Sorry for getting back to you so late. I had some other stuff to do. I tried out your suggestion and this time I get a slightly different error:
Error executing process > 'get_depth (1)'
Caused by:
Process `get_depth (1)` terminated with an error exit status (1)
Command executed:
samtools bedcov --reference hg38/chr22_hg38.fasta cyp_hg38/test3.bed SIM001.bam > SIM001_cyp2d6_ctrl.depth
Command exit status:
1
Command output:
(empty)
Command error:
/bin/bash: .command.sh: No such file or directory
Work dir:
/home/StellarPGx/work/98/bd5ddb097511ff01f994cea826cd9d
Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
I checked: hg38/chr22_hg38.fasta
and cyp_hg38/test3.bed
are both there ...
@ajpar94,
According to your error message, the file which is missing is .command.sh
which Nextflow uses in its operation. Perhaps check to see if it is indeed in the work directory (/home/StellarPGx/work/98/bd5ddb097511ff01f994cea826cd9d).
As I mentioned, we don't have the option of testing on Kubernetes on our side at present. Perhaps some information here would help https://www.nextflow.io/docs/latest/kubernetes.html.
Oh, you are right. But .command.sh
does exist as well.
I will read about running nextflow with Kubernetes. If we find a working solution, I will let you know. Thank you for your help!
Hi @ajpar94,
We went through some options you could try for your use case. The error you're getting seems to come from the fact that your /home/StellarPGx/
directory is not being mounted into the main docker image.
You mentioned that you're starting up the image as follows:
docker run -v /var/run/docker.sock:/var/run/docker.sock -itd <image_name>
However, the correct command should probably be the following:
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /home/StellarPGx:/home/StellarPGx -it <image_name>
If this doesn't work, could you share the contents of your nextflow.config
file? That would give us more context to help with debugging.
Thanks
Closing this as there are no recent updates on the suggested solution.
Hello,
I am trying to run StellarPgx together with Docker (not Singularity) from within a Docker container. The whole "Docker in Docker" situation is still a bit confusing to me. However, what I have tried is to define a docker image with docker and nextflow installed using this Dockerfile:
After building the image, I run the following commands:
docker pull twesigomwedavid/stellarpgx-dev:latest
docker run -v /var/run/docker.sock:/var/run/docker.sock -itd <image_name>
and from within the docker container, I do:
cd StellarPGx
export NXF_DEFAULT_DSL=1
nextflow run main.nf -profile standard,test
I get the following error:
Is there a way to resolve this issue? Is there another way to do it (avoiding Docker in Docker)?