monai.deploy.core.resource¶
- monai.deploy.core.resource(cpu=None, memory=None, gpu=None)[source]¶
A decorator that adds an resource requirement to the application.
- Parameters
cpu (
Optional
[int
]) – A number of CPU cores required.memory (
Union
[int
,str
,None
]) – A string or integer representation of bytes to be converted. (eg. “0.3 Gib”, “3mb”, “1024”, 65536)gpu (
Optional
[int
]) – A number of GPUs required.
- Returns
A decorator that adds an resource requirement to the application.