epi2me-labs / wf-somatic-variation

Other
15 stars 8 forks source link

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested #1

Closed myxotheles closed 1 year ago

myxotheles commented 1 year ago

What happened?

Hi,

I am encountering issues when using the workflow in my desktop app causing the workflow to crash

Apple Mac Book Pro M2 Pro processor, 12 Cores, 16 GB

I suspect it has got to do with apple silicon?

Operating System

macOS

Workflow Execution

EPI2ME Labs desktop application

Workflow Execution - EPI2ME Labs Versions

Version 5.0.2 (5.0.2)

Workflow Execution - CLI Execution Profile

Docker

Workflow Version

wf-somatic-variation v0.2.0

Relevant log output

`ERROR ~ Error executing process > 'somatic_sv:nanomonsv_parse (2)'
Caused by:
  Process `somatic_sv:nanomonsv_parse (2)` terminated with an error exit status (1)
Command executed:
  export REF_PATH=ref_cache/%2s/%2s/%s
  mkdir SAMPLE_normal/
  nanomonsv parse C3634_recalibrated.bam SAMPLE_normal/parsed
Command exit status:
  1
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
  Traceback (most recent call last):
    File "/home/epi2melabs/conda/bin/nanomonsv", line 10, in <module>
      sys.exit(main())
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/__init__.py", line 13, in main
      args.func(args)
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/run.py", line 40, in parse_main
      parse_alignment_info(args.bam_file, args.output_prefix + ".tmp.deletion_info.txt", 
    File "/home/epi2melabs/conda/lib/python3.10/site-packages/nanomonsv/parse.py", line 44, in parse_alignment_info
      if cigartuples[0][0] == 5: left_hard_clipping_size = cigartuples[0][1]
  TypeError: 'NoneType' object is not subscriptable
Work dir:
  /Users/thomaserblich/epi2melabs/instances/wf-somatic-variation_9acb3440-6ab7-450c-8529-b2a9596b9fe8/work/9f/5992da705140c9f78d14d06ac1e0bc
Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`
 -- Check '/Users/thomaserblich/epi2melabs/instances/wf-somatic-variation_9acb3440-6ab7-450c-8529-b2a9596b9fe8/nextflow.log' file for details
WARN: Killing running tasks (4)`
myxotheles commented 1 year ago

Hi, any chance you could provide a linux/arm64 image on dockerhub to use on M2?

myxotheles commented 1 year ago

Tried to build one myself following instructions https://labs.epi2me.io/wfquickstart/ and adding buildx and parameter --platform:

(base)  ~ % docker buildx build \
-t ontresearch/wf-somatic-variation:latest \
-f Dockerfile \
--build-arg BASEIMAGE=ontresearch/base-workflow-image:v0.1.0 \
--platform linux/arm64 \
--load \
.
[+] Building 6.6s (3/3) FINISHED                                                                                                                                                                                                             
 => [internal] booting buildkit                                                                                                                                                                                                         6.4s
 => => pulling image moby/buildkit:buildx-stable-1                                                                                                                                                                                      5.7s
 => => creating container buildx_buildkit_mystifying_mirzakhani0                                                                                                                                                                        0.7s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s
 => => transferring dockerfile: 2B                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                         0.0s
ERROR: failed to solve: failed to read dockerfile: open /tmp/buildkit-mount2748393193/Dockerfile: no such file or directory

There seems to be no Dockerfile. Am I doing something wrong?

RenzoTale88 commented 1 year ago

@myxotheles the page you are pointing to is deprecated, as we now prepare the container in a different way. The preparation of ARM containers requires the individual dependencies to be compiled and available for the architecture, and not all of them are at the moment, so unfortunately this is currently not a viable option. However, as discussed in #2 the issue you are coming across is not related to the arm architecture, and the workflow should work anyway, though slower.

myxotheles commented 1 year ago

Thanks! That makes sense. I actually managed to run the workflow on my M2 with Rosetta activated in Docker, so it seems to work but it is slow of course.