I am trying to run a bioinformatic pipeline (Nextflow - Eager) that uses Docker but as I have a Mac M1 chip it does not work and I get this error message:
Command error:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
I know that I should build the image for arm but I am not sure I am doing it correctly.
I have tried to vim ~/.nextflow/config
and add docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64'
then run the pipeline again with this command: nextflow run nf-core/eager -r 2.4.6 -profile test,docker
but I still get this error:
Execution cancelled -- Finishing pending tasks before exit
Error executing process > 'adapter_removal (JK2782_L1)'
Caused by:
Process exceeded running time limit (10m)
Command executed:
mkdir -p output
AdapterRemoval --file1 JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq.gz --file2 JK2782_TGGCCGATCAACGA_L008_R2_001.fastq.gz.tengrand.fq.gz --basename JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq_L1.pe --gzip --threads 2 --qualitymax 41 --collapse --trimns --trimqualities --adapter1 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC --adapter2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA --minlength 30 --minquality 20 --minadapteroverlap 1
cat *.collapsed.gz *.collapsed.truncated.gz *.singleton.truncated.gz *.pair1.truncated.gz *.pair2.truncated.gz > output/JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq_L1.pe.combined.tmp.fq.gz
mv *.settings output/
## Add R_ and L_ for unmerged reads for DeDup compatibility
AdapterRemovalFixPrefix -Xmx4g output/JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq_L1.pe.combined.tmp.fq.gz | pigz -p 1 > output/JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq_L1.pe.combined.fq.gz
Command exit status:
-
Command output:
(empty)
Command error:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Trimming paired end reads ...
Opening FASTQ file 'JK2782_TGGCCGATCAACGA_L008_R1_001.fastq.gz.tengrand.fq.gz', line numbers start at 1
Opening FASTQ file 'JK2782_TGGCCGATCAACGA_L008_R2_001.fastq.gz.tengrand.fq.gz', line numbers start at 1
Processed a total of 20,000 reads in 1.0s; 19,000 reads per second on average ...
Work dir:
/Users/valentina/test2/work/11/83eeaec751248909302745eca1e24f
Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line
How can I fix it? Thanks
The Mac M1 is an ARM64 processor but nfcore/eager
is available for AMD64 only.
The M1 should be capable of running AMD64 images too thanks to an emulator called Rosetta (see this page) but someone says (see this page):
you'll never be happy using any amd64 components in Docker on a mac M1. Docker Desktop (and only Docker Desktop) went way out of its way to try to be able to run amd64 components, but it really doesn't work out in general.
At least you should verify that you have a recent version of Docker Desktop and also the Rosetta emulator or install it; the installation of Rosetta can de done with:
softwareupdate --install-rosetta
as explained in Docker documentation. Note that I have not a Mac so I cannot be more specific on this topic. I also don't know the bioinformatic tools you are using so I cannot confirm that the right way of forcing the use of the AMD64 image is editing ~/.nextflow/config
, but it seems that the answer is no because the error message still says "no specific platform was requested".
Since you are not running Docker directly but through another tool called nextflow
you could try to use the solution suggested in this page:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
An alternative solution is to rebuild the image for ARM64 but it's not a trivial task. I succeded in rebuilding the AMD64 image but got an error with the ARM64 image: it seems that some prerequisite is not met but I cannot do more without knowing this bionformatic tool.