Skip to content

Commit 3c51413

Browse files
committed
fix cellpose GPU flags
1 parent 82991cb commit 3c51413

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

active_plugins/runcellpose.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,13 @@ def run(self, workspace):
601601
# Save the image to the Docker mounted directory
602602
skimage.io.imsave(temp_img_path, x_data)
603603

604-
cmd = [docker_path, 'run', '--rm', '-v', f'{temp_dir}:/data', self.docker_image.value]
604+
cmd = [docker_path, 'run', '--rm', '-v', f'{temp_dir}:/data',]
605605
if self.use_gpu.value:
606606
cmd += ['--gpus', 'all']
607-
cmd += ['cellpose', '--verbose', '--dir', '/data/img', '--pretrained_model']
607+
cmd += [self.docker_image.value, 'cellpose']
608+
if self.use_gpu.value:
609+
cmd += ['--use_gpu']
610+
cmd += ['--verbose', '--dir', '/data/img', '--pretrained_model']
608611
if self.mode.value !='custom':
609612
cmd += [self.mode.value]
610613
else:

0 commit comments

Comments
 (0)