Skip to content

Commit 597cb3d

Browse files
authored
Update superdsm: Fix compatibility with Biocontainers (#178)
* Fix biocontainers compatibility * Trigger CI * Update .shed.yml to trigger CI * [skip-ci] Reset `@VERSION_SUFFIX@` * Use cleaner solution * Fix linting * Add code comment explaining the change * Remove blank lines
1 parent 4afe001 commit 597cb3d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tools/superdsm/.shed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ description: Globally optimal segmentation method based on superadditivity and d
44
long_description: Globally optimal segmentation method based on superadditivity and deformable shape models for cell nuclei in 2-D fluorescence microscopy images.
55
name: superdsm
66
owner: imgteam
7-
homepage_url: https://github.com/bmcv
7+
homepage_url: https://superdsm.readthedocs.io
88
remote_repository_url: https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/superdsm/

tools/superdsm/run-superdsm.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ def flatten_dict(d, sep='/'):
8686
import superdsm.io
8787
import superdsm.render
8888

89-
ray.init(num_cpus=num_processes, log_to_driver=True)
90-
91-
with tempfile.TemporaryDirectory() as tmpdirname:
89+
# The explicit `dir` and `prefix` is to avoid breaking the 107 byte limit for socket paths in Biocontainers
90+
# See for details: https://github.com/BMCV/galaxy-image-analysis/pull/178
91+
with tempfile.TemporaryDirectory(dir='/tmp', prefix='superdsm') as tmpdirname:
9292
tmpdir = pathlib.Path(tmpdirname)
93+
ray.init(num_cpus=num_processes, log_to_driver=True, _temp_dir=str(tmpdir / 'ray'))
94+
9395
img_ext = imghdr.what(args.image)
9496
img_filepath = tmpdir / f'input.{img_ext}'
9597
shutil.copy(str(args.image), img_filepath)

0 commit comments

Comments
 (0)