Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied #2

Open
alexpron opened this issue May 6, 2021 · 1 comment
Open

Permission denied #2

alexpron opened this issue May 6, 2021 · 1 comment

Comments

@alexpron
Copy link

alexpron commented May 6, 2021

Dear .
I gave a try to the docker version of the great fetal brain segmentation tool you provide. I ran the fetal brain segmentation of 3 stacks using niftymic segmentation command. I should precise I ran the docker with singularity on a high performance computing cluster (slurm interface). When launching the segmentation I obtained the error below:

File "fetal_brain_seg.py", line 86, in
run_inference(input_data=img, config_info=config)
File "/app/NiftyMIC/MONAIfbs/monaifbs/src/inference/monai_dynunet_inference.py", line 273, in run_inference
evaluator.run()
File "/usr/local/lib/python3.6/site-packages/monai/engines/evaluator.py", line 91, in run
super().run()
File "/usr/local/lib/python3.6/site-packages/monai/engines/workflow.py", line 157, in run
super().run(data=self.data_loader, max_epochs=self.state.max_epochs)
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 691, in run
return self._internal_run()
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 762, in _internal_run
self._handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 465, in _handle_exception
self._fire_event(Events.EXCEPTION_RAISED, e)
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 423, in _fire_event
func(*first, *(event_args + others), **kwargs)
File "/usr/local/lib/python3.6/site-packages/monai/handlers/stats_handler.py", line 145, in exception_raised
raise e
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 722, in _internal_run
self._fire_event(Events.STARTED)
File "/usr/local/lib/python3.6/site-packages/ignite/engine/engine.py", line 423, in _fire_event
func(*first, *(event_args + others), **kwargs)
File "/usr/local/lib/python3.6/site-packages/monai/handlers/checkpoint_loader.py", line 82, in call
checkpoint = torch.load(self.load_path, map_location=self.map_location)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 525, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 212, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 193, in init
super(_open_file, self).init(open(name, mode))
PermissionError: [Errno 13] Permission denied: '/app/NiftyMIC/MONAIfbs/monaifbs/models/checkpoint_dynUnet_DiceXent.pt'

The .pt file seems to exist (at least when I run the singularity image) but the script serialization.py can not read it.

Do you have any hint ?
Have a good day
Alex

@EricDeveaud
Copy link

in my case previous singularity build, permission of the file is incorrect

Singularity> ls -l models/
total 357755
-rw------- 1 root root 366340534 Apr 12 14:28 checkpoint_dynUnet_DiceXent.pt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants