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

Docker setting #368

Open
recreateme opened this issue Sep 26, 2024 · 2 comments
Open

Docker setting #368

recreateme opened this issue Sep 26, 2024 · 2 comments

Comments

@recreateme
Copy link

i'm trying to integrated my python code to docker ,and queer things occured when i predicting using docker command,
this is the details
`C:\Windows\System32>docker run --name seg --rm --gpus=all -v D:\rs:/input -v D:\output:/output -it segment --input /input/ct2.nii.gz --output /output

If you use this tool please cite: https://pubs.rsna.org/doi/10.1148/ryai.230024

TotalSegmentator sends anonymous usage statistics. If you want to disable it check the documentation.
Resampling...
Resampled in 2.51s
Predicting part 1 of 5 ...
/usr/local/lib/python3.9/site-packages/nnunetv2/inference/predict_from_raw_data.py:84: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
checkpoint = torch.load(join(model_training_output_dir, f'fold_{f}', checkpoint_name),
100%|███████████████████████████████████████████████████████████████████████████████████| 12/12 [00:02<00:00, 4.78it/s]

C:\Windows\System32>`
it looks like the model only predicted 1/5 and stopped, i can use cuda . the memeory of cpu and gpu is absolutely enough ,i just dont know what happpened, no errors or warnings finally.

@mario-huang
Copy link
Contributor

Me too. Sometimes stops at here:

Resampling...
Resampled in 7.54s
Predicting part 1 of 5 ...
/usr/local/lib/python3.12/site-packages/nnunetv2/inference/predict_from_raw_data.py:84: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
checkpoint = torch.load(join(model_training_output_dir, f'fold_{f}', checkpoint_name),
100%|██████████| 45/45 [00:02<00:00, 19.55it/s]

@recreateme
Copy link
Author

the same question ocuured me, and I tried to download all config and pretrained models to onnx model,reconstruct the process.Finally, packing the procedure to exe , that works!

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