CDCgov / phoenix

🔥🐦🔥PHoeNIx: A short-read pipeline for healthcare-associated and antimicrobial resistant pathogens
https://www.cdc.gov/ncezid/divisions-offices/about-dhqp.html
Apache License 2.0
60 stars 18 forks source link

the singularity issues that we have to use locally pulled containers. #86

Closed ybdong919 closed 1 year ago

ybdong919 commented 1 year ago

When I run the pipeline, I meet similar errors again and again. Namely, the error shows “ failed to pull singularity image”.

To solve the problem, I run the pull command in my terminal to download the singularity image. And then copy/move the image to the directory .../work/singularity/. Then run the phoenix pipeline again. The pipeline was completed successfully.

Error message showed on terminal is below:

error executing process > 'PHOENIX:PHOENIX_EXTERNAL:QUAST (JBI21001180)'

Caused by: Failed to pull singularity image command: singularity pull --name staphb-quast-5.0.2.img.pulling.1675344046282 docker://staphb/quast:5.0.2 > /dev/null status : 255 message: INFO: Converting OCI blobs to SIF format INFO: Starting build... Getting image source signatures Copying blob sha256:566c89e8bac0ca98ddc2d550eef083d34367ce1ad4365ad73f296d150c768e51 Copying blob sha256:4d77b1b29f2e9b6f141b9d8f74b601f40eb998544783f4a0a3cdc384873c1a4e Copying blob sha256:ecc05c8a19c0cf83f2f44263c967c3fe81fffc4b41b592ad088fb1534c206e70 Copying blob sha256:7c793be88baee3f3204444e4d4e49c4e44c1709d40182c131cd5681c94e17227 Copying blob sha256:7b378fa0f9085667ced1c76c9919cde8663becf2218e8d20e2df8d0824311531 Copying blob sha256:b6fa64a3fefbe5300304ff15637371a60341d1f51e2840c4f23076851ff0317b Copying config sha256:ea1d4ead0e22152711f20a7fbd09e122184e9b4a76574608421bc0924251371a Writing manifest to image destination Storing signatures FATAL: While making image from oci registry: error fetching image to cache: while building SIF from layers: conveyor failed to get: no descriptor found for reference "c2667dcf00d1fa5d8747de891efd2e76753d88885ee68f5387232c78de2dbe1b"

jvhagey commented 1 year ago

Hi @ybdong919, what is the command that produces this error? Are you using a custom profile or just -profile singularity? By default, Singularity uses $HOME/.singularity/cache as the location for the cache. You can change the location of the cache by setting the SINGULARITY_CACHEDIR as a environmental variable. Is that or other singularity env variables set for you?

ybdong919 commented 1 year ago
  1. I customed the profile: 1) change HPC_Template.config: profiles { custom_HPC { // You can change this to the name of the profile you will be calling in the -profile rather than -profile custom_HPC

    process {
        executor   = 'slurm' // Change this to your executor (i.e. slurm - https://www.nextflow.io/docs/latest/executor.html) here we use sge (Sun Grid Engine as an example)
        clusterOptions = '--account=bphl-umbrella --qos=bphl-umbrella'
    
        // This will only effect processes that are labelled "process_low" change the queues in the other "withLabel" statements for each process type
    
    }

    } }

    2) add something in nextflow.config:

            //HPC config
          includeConfig 'conf/HPC_Template.config'
  2. SINGULARITY_CACHEDIR has already been changed to my own directory.

  3. The command that produes this error $nextflow run /phoenix -profile singularity,custom_HPC --input samplesheet.csv

ybdong919 commented 1 year ago

This issue happened only recently. It has been running well before.

jvhagey commented 1 year ago

Hmmmm I thought I had heard through the 🍇 vine that you had recently switched to apptainer? Did the error occur around this time? It appears that there was a recent change to nextflow to support use of apptainer. Can you try to update your nextflow and see if that was the issue?

ybdong919 commented 1 year ago

Let me try. :)

jvhagey commented 1 year ago

Hi @ybdong919 just wanted to check in and see if this got sorted?

ybdong919 commented 1 year ago

Yes, it is working now. Really appreciate your help.