etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
547 stars 165 forks source link

Error building docker image #619

Closed tea-kostic closed 3 years ago

tea-kostic commented 3 years ago

Hi!

I am trying to build a docker image using the Dockerfile provided here. I am getting this error:

RUN cnvkit.py version:                                                                                                            
#10 1.690 Traceback (most recent call last):                                                                                               
#10 1.690   File "/usr/local/bin/cnvkit.py", line 4, in <module>                                                                           
#10 1.690     from cnvlib import commands                                                                                                  
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/cnvlib/__init__.py", line 5, in <module>                                          
#10 1.690     from .commands import *
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/cnvlib/commands.py", line 34, in <module>
#10 1.690     from . import (access, antitarget, autobin, batch, bintest, call, core,
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/cnvlib/batch.py", line 8, in <module>
#10 1.690     from . import (access, antitarget, autobin, bintest, call, core, coverage,
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/cnvlib/segmentation/__init__.py", line 17, in <module>
#10 1.690     from . import cbs, flasso, haar, hmm, none
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/cnvlib/segmentation/hmm.py", line 11, in <module>
#10 1.690     import pomegranate as pom
#10 1.690   File "/usr/local/lib/python3.8/dist-packages/pomegranate/__init__.py", line 11, in <module>
#10 1.690     from .base import *
#10 1.690   File "pomegranate/base.pyx", line 1, in init pomegranate.base
#10 1.690 ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

executor failed running [/bin/sh -c cnvkit.py version]: exit code: 1

What may be causing this error? How should it be resolved?

Thank you in advance, Tea

tetedange13 commented 3 years ago

Hi @tea-kostic ,

Not an author of CNVkit, but it seems to look like this Stack thread => Could you please run python -c "import numpy; print(numpy.__version__)", to know which Numpy version were installed in your Docker?

Hope this helps. Have a nice day. Felix.

tea-kostic commented 3 years ago

Hi @tetedange13 ,

You are right, it was an older version of numpy, and once I specified in the dockerfile numpy version 1.20.0 it solved the issue.

Thanks a lot! Have a great day. Tea

tetedange13 commented 3 years ago

@tea-kostic I am happy this solved your problem ! => But could you please reopen this issue? => Because I may be wrong but I think CNVkit's Dockerfile could be made less sensible to such "Numpy version conflicts" issue

Ideas:

etal commented 3 years ago

Thanks @tea-kostic for reporting and @tetedange13 for testing the solution. I've updated the Dockerfile to first update pip itself, then use it to install the cnvkit package directly, which seems to work fine now.