GSTT-CSC / TotalSegmentator-AIDE

TotalSegmentator packaged as an AIDE Application, based on the MONAI Application Package (MAP) standard.
Other
24 stars 5 forks source link

Enable GPU when running TotalSegmentator MAP #2

Closed tomaroberts closed 1 year ago

tomaroberts commented 1 year ago

Currently, the TotalSegmentator MAP runs, but it is failing to use the GPU.

I have run TotalSegmentator via Python on the same machine, where it does use the GPU, so it seems this is an issue related to Docker/the MAP.

tomaroberts commented 1 year ago

Fixed – basically for a MAP, remember to add the resource decorator where the Application class is constructed.

e.g. line 48 in here: https://github.com/Project-MONAI/monai-deploy-app-sdk/blob/main/examples/apps/ai_livertumor_seg_app/app.py

@resource(cpu=1, gpu=1, memory="32Gi")