mhhennig / HS2

Software for high density electrophysiology
GNU General Public License v3.0
26 stars 17 forks source link

create_probe_files leading to write OSError #63

Closed chyumin closed 4 months ago

chyumin commented 2 years ago

I'm working on creating a docker image of HS2 to run with spikeinterface in docker and singularity mode. Here is PR with the dockerfile: https://github.com/SpikeInterface/spikeinterface-dockerfiles/pull/42/files

The image generated with Dockerfile from the above PR works when running sorter in docker mode, but when I try to run from singularity I'm getting this error:

Traceback (most recent call last):
  File "/home/yu/spikeinterface/spikeinterface/sorters/basesorter.py", line 225, in run_from_folder
    SorterClass._run_from_folder(output_folder, sorter_params, verbose)
  File "/home/yu/spikeinterface/spikeinterface/sorters/herdingspikes/herdingspikes.py", line 183, in _run_from_folder
    Probe = hs.probe.RecordingExtractor(
  File "/usr/local/lib/python3.8/site-packages/herdingspikes/probe.py", line 305, in __init__
    create_probe_files(
  File "/usr/local/lib/python3.8/site-packages/herdingspikes/probe.py", line 27, in create_probe_files
    with open(pos_file, "w") as f:
OSError: [Errno 30] Read-only file system: '/usr/local/lib/python3.8/site-packages/herdingspikes/probe_info/positions_spikeextractor'

The error occours in this line which is trying to write in a Read-only path (in singularity context)

mhhennig commented 2 years ago

Thanks for pointing this out. The way the probe info is implemented is indeed not great, it should be written into a local directory. I can see if I can fix this...

alejoe91 commented 2 years ago

@mhhennig any update on this? This unfortunately makes the docker image unusable :( https://github.com/SpikeInterface/spikeinterface-dockerfiles/runs/7968455344?check_suite_focus=true

mhhennig commented 4 months ago

This is fixed now, the code no longer writes out these files.