No module named pydicom while running the MAP #467
Replies: 1 comment 2 replies
-
@ArpanGyawali Please add pydicom as a package dependency either in the application or one of the operators, e.g. in app.py, add the pip dependency decorator (addition in bold italic) from monai.deploy.core import Application, resource, env from nifty_data_loader_operator import NiftiDataLoader @resource(cpu=1, gpu=1, memory="7Gi") This is because the pydicom package is not a dependency of the App SDK itself, though one of the operators in monai.deploy.operators module depends on pydicom, making it necessary to denote pydicom as a dependent package any time any operator from monai.deploy.operators is imported in an app. In you case, you are also directly importing codes from pydicom.sr.codedict, so pydicom has to be decorated as a dependency. |
Beta Was this translation helpful? Give feedback.
-
I created a Monai Application Package for an skull strip application that takes nifty head CTA scan as input and gives brain segmentation as output. The application works fine and gives the output while running using
monai-deploy exec app/ -i input_file -o Output_Dir -m model.ts
Then i packaged it using
monai-deploy package -b nvcr.io/nvidia/pytorch:22.08-py3 app/ --tag image_name -m model.ts
Now when i run this package using
monai-deploy run packege_image_name input_file Output_Dir
It gives me this error
The code i am using is
SkullStripApp
app.py
skull_strip_operator.py
nifty_Data_loader_operator.py
Can someone please look into the error i am facing? I have the required module pydicom in the environment on which i created the package.
Beta Was this translation helpful? Give feedback.
All reactions