SpikeInterface / spikeinterface-dockerfiles

Collection of spike sorters Docker files
MIT License
8 stars 9 forks source link

downgrade pip version to avoid dependency issues during installations #17

Closed samuelgarcia closed 2 years ago

samuelgarcia commented 2 years ago

related to https://github.com/SpikeInterface/spikeinterface/pull/440

force pip version here instead of in spikeinterface code.

samuelgarcia commented 2 years ago

@JuliaSprenger

JuliaSprenger commented 2 years ago

I think it would make sense to avoid the pip version 21.3.x in all of the docker files that use pip, i.e also yass, kilosort3 and kilosort2.

JuliaSprenger commented 2 years ago

I tested the new tridesclous container in docker and got another package version related error:

Traceback (most recent call last):\\n  File "<string>", line 1, in <module>\
  File "/usr/local/lib/python3.8/site-packages/tridesclous/__init__.py", line 27, in <module>
    from .catalogueconstructor import CatalogueConstructor\
File "/usr/local/lib/python3.8/site-packages/tridesclous/catalogueconstructor.py", line 31, in <module>
   from . import cluster \
  File "/usr/local/lib/python3.8/site-packages/tridesclous/cluster.py", line 21, in <module>
    from .pruningshears import PruningShears
  File "/usr/local/lib/python3.8/site-packages/tridesclous/pruningshears.py", line 27, in <module>
    import hdbscan\\n  File "/usr/local/lib/python3.8/site-packages/hdbscan/__init__.py", line 1, in <module>
    from .hdbscan_ import HDBSCAN, hdbscan
  File "/usr/local/lib/python3.8/site-packages/hdbscan/hdbscan_.py", line 21, in <module>
    from ._hdbscan_linkage import (single_linkage,
  File "hdbscan/_hdbscan_linkage.pyx", line 1, in init hdbscan._hdbscan_linkage
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject''

The installed package versions are

'b"Package         Version
--------------- -------
cloudpickle     2.0.0
cycler          0.11.0
Cython          0.29.26
et-xmlfile      1.1.0
fonttools       4.29.0
h5py            3.6.0
hdbscan         0.8.27
joblib          1.1.0
kiwisolver      1.3.2
llvmlite        0.38.0
loky            3.0.0
matplotlib      3.5.1
neo             0.10.0
numba           0.55.0
numpy           1.20.3
openpyxl        3.0.9
packaging       21.3
pandas          1.4.0
Pillow          9.0.0
pip             21.2.4
pyparsing       3.0.7
pyqtgraph       0.12.3
python-dateutil 2.8.2
pytz            2021.3
quantities      0.13.0
scikit-learn    1.0.2
scipy           1.7.3
seaborn         0.11.2
setuptools      57.5.0
six             1.16.0
threadpoolctl   3.0.0
tqdm            4.62.3
tridesclous     1.6.4
wheel           0.37.0

Update: The same errors occur when setting up a corresponding conda environment, so it's not a dockerization problem.

JuliaSprenger commented 2 years ago

@samuelgarcia Did you test the container on your side? Do you also get the same error when importing tridesclous?

samuelgarcia commented 2 years ago

@JuliaSprenger : I am testing now locally. It works with docker. I change the dockerfiles to force some version of numpy/numba/hdbscan. I will test with singularity.

samuelgarcia commented 2 years ago

I have just push "spikeinterface/tridesclous-base:1.6.4-1" so the same version of TDC but with a new build.

JuliaSprenger commented 2 years ago

Hi @samuelgarcia The tridesclous container works also for me. Do you also want to fix the other containers? https://github.com/SpikeInterface/spikeinterface-dockerfiles/pull/17#issuecomment-1020187124

samuelgarcia commented 2 years ago

kilosort docker file are not working. yass use conda. So I think we can force version only for theses 3 sorters for now.

JuliaSprenger commented 2 years ago

yass is using pip to install yass and scipy.

How about opening an issue to inform users of the kilosort containers to be broken?

samuelgarcia commented 2 years ago

I will be back on yass later.