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

MONAI Label: The OHIF flow as described in the README does not work #594

Closed
patricio-astudillo opened this issue Jan 24, 2022 · 26 comments
Closed
Assignees

Comments

@patricio-astudillo
Copy link

The OHIF flow as described in the README does not work. I have followed the instructions and tried to get OHIF up and running, but it does not work. Can anyone confirm that this flow is currently not working or update the README file?

@SachidanandAlle
Copy link
Collaborator

Can you please raise this over MONAI Label github repo..

Feels like some step you have missed.. otherwise multiple people have tried running MONAI Label over OHIF (given you have setup for dicomweb e.g. orthanc)

@diazandr3s can you please help

@wyli wyli transferred this issue from Project-MONAI/MONAI Jan 24, 2022
@diazandr3s
Copy link
Collaborator

Hi @patricio-astudillo, thanks for raising this issue. Which web explorer are you using to open OHIF? I saw sometimes Firefox doesn't load OHIF? I guess it is a cookies issue. Can you please try opening OHIF with Google Chrome? http://127.0.0.1:8000/ohif
Could we also make sure there are images in the DICOMWeb (Orthanc)? http://127.0.0.1:8042

@patricio-astudillo
Copy link
Author

Hey,
@diazandr3s I will note down my installation process:

Prepare environment:
conda create --name label
conda activate label
python --version

Python 3.10.0

Install:
pip install monailabel

fails due to:

ERROR: Cannot install monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.6.0, monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.7.0 and monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm]==0.8.0 because these package versions have conflicting dependencies.

The conflict is caused by:
monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.8.0 depends on torch>=1.6
monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.7.0 depends on torch>=1.5
monai[gdown,ignite,itk,lmdb,nibabel,openslide,pillow,psutil,skimage,tensorboard,torchvision,tqdm] 0.6.0 depends on torch>=1.5

Try again with a different python version:

Prepare environment:
conda create --name label python=3.7
conda activate label
python --version

Python 3.7.11

pip install monailabel
pip show monailabel

Name: monailabel
Version: 0.3.1
Summary: Active Learning Toolkit for Healthcare Imaging
Home-page: https://monai.io/
Author: MONAI Consortium
Author-email: monai.contact@gmail.com
License: Apache License 2.0
Location: /home/admin/miniconda3/envs/label/lib/python3.7/site-packages
Requires: monai, filelock, pydantic, pynetdicom, watchdog, aiofiles, pydicom, uvicorn, python-dotenv, pydicom-seg, expiringdict, timeloop, dicomweb-client, simplecrf, httpx, python-multipart, fastapi, schedule, requests-toolbelt, pyyaml
Required-by:

monailabel apps --download --name deepedit --output apps

Using PYTHONPATH=/home/admin/miniconda3/envs:
deepedit is copied at: /home/admin/apps/deepedit

monailabel datasets --download --name Task09_Spleen --output datasets

Using PYTHONPATH=/home/admin/miniconda3/envs:
Task09_Spleen.tar: 1.50GB [01:42, 15.7MB/s]
2022-01-25 12:40:28,399 - INFO - Downloaded: datasets/Task09_Spleen.tar
2022-01-25 12:40:31,000 - INFO - Verified 'Task09_Spleen.tar', md5: 410d4a301da4e5b2f6f86ec3ddba524e.
2022-01-25 12:40:31,000 - INFO - Writing into directory: /home/admin/datasets.
Task09_Spleen is downloaded at: datasets/Task09_Spleen

Now I can go to 127.0.0.1:8000 and see;
image

sudo apt-get install orthanc orthanc-dicomweb
Now I can go to 127.0.0.1:8042/dicom-web

monailabel start_server --app apps/deepedit --studies http://127.0.0.1:8042/dicom-web

Now I can go to 127.0.0.1:8000/ohif and see;
image

But if I would like to inspect a study I can see;
image

@diazandr3s
Copy link
Collaborator

Hi @patricio-astudillo,

Thanks for the detailed response, this is helpful :)
From what I can see the only step missing is adding DICOM studies to the Orthanc server. Please go to http://127.0.0.1:8042/ and upload some DICOM images/studies.

You've already downloaded the dataset in NIFTI format. But if you'd like to use OHIF, they need to be uploaded in Orthanc.

Here are the instructions to convert images from NIFTI to DICOM: https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/ohif

This is essentially the reason you can't see studies in OHIF. Once you load them in Orthanc, you should be able to see them in OHIF.

Please let us know how this goes :)

@patricio-astudillo
Copy link
Author

Hi @diazandr3s,

You are welcome and thanks for your advice however, I've uploaded the DICOM of a single patient to the Orthanc server. I've blocked it with a white rectangle for privacy reasons. However, I tried to replicate the bug this morning and now the loading works for some reason.

However, when I want to enable the MONAI label panel, I receive the following error:
image

@diazandr3s
Copy link
Collaborator

Hi @patricio-astudillo,

Would it be possible to see the logs? You can find them in the logs folder or at http://127.0.0.1:8000/logs

If it helps, I'm happy to schedule a meeting and talk about the use case.

Please let us know

@patricio-astudillo
Copy link
Author

Dear @diazandr3s ,

Thanks for the quick response, I've contacted you through linked-in to organise a meeting.

Best regards,
Patricio

@diazandr3s
Copy link
Collaborator

Superb!

@patricio-astudillo
Copy link
Author

Hi, I worked with @diazandr3s on this issue and we managed to resolve this. Thanks

@diazandr3s
Copy link
Collaborator

Superb!

@adwaykanhere
Copy link

adwaykanhere commented Oct 11, 2022

@patricio-astudillo @diazandr3s How did you resolve this issue? When I go to localhost:8000/ohif/ I'm seeing a blank page

I have loaded images on Orthanc and can see them at localhost:8042

@diazandr3s
Copy link
Collaborator

Hi @adwaykanhere

It is great to see you're using MONAI Label.

Can I ask you whether you're using the Docker container? I've just checked and it seems to work smoothly when using Docker:

ohif.mp4

Please let us know

@SachidanandAlle
Copy link
Collaborator

How you have installed monailabel?

@patricio-astudillo
Copy link
Author

patricio-astudillo commented Oct 11, 2022 via email

@SachidanandAlle
Copy link
Collaborator

SachidanandAlle commented Oct 11, 2022

@patricio-astudillo @diazandr3s How did you resolve this issue? When I go to localhost:8000/ohif/ I'm seeing a blank page

I have loaded images on Orthanc and can see them at localhost:8042

You might be using github way of monailabel.. in that case, you have to build OHIF explicitly...
https://github.com/Project-MONAI/MONAILabel#git-checkout-developer-mode

If you are using DICOM-Web + OHIF then you have to build OHIF package separate. Please refer here.

https://github.com/Project-MONAI/MONAILabel/tree/main/plugins/ohif#development-setup

Easy way is run PIP Install MONAILabel or use MONAILabel Docker

@adwaykanhere
Copy link

@diazandr3s @patricio-astudillo @SachidanandAlle Thanks so much for all your help!

I'm using the docker version of MONAI, but I still can't seem to get it to work. I'm running on macOS 12.

I followed @diazandr3s procedure but when I open http://0.0.0.0/8000 I can't connect to the webpage.

@SachidanandAlle
Copy link
Collaborator

http://0.0.0.0/8000 ? First.. it's http://0.0.0.0:8000 for Server APIs.. and http://0.0.0.0:8000/ohif for OHIF interface..
If basic API page is not up then it means monailabel server is not even up.

If you can share the command which you are running to start the server and the logs... that can be more helpful for others to suggest what's wrong...

If you are using docker sometimes you need to open up the port for host container as well.. and sometimes the loopback address..

@adwaykanhere
Copy link

adwaykanhere commented Oct 11, 2022

My apologies, I meant http://0.0.0.0:8000/

The commands I run are -

  1. docker run --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash (no gpus for macOS)
  2. monailabel apps --download --name radiology --output apps
  3. monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

Connecting to http://0.0.0.0:8000/
Screen Shot 2022-10-11 at 11 56 23 AM

Connecting to http://0.0.0.0:8000/ohif/
Screen Shot 2022-10-11 at 12 03 10 PM

Connecting to http://127.0.0.1:8042 opens Orthanc where I have one patient's DICOM image data
Screen Shot 2022-10-11 at 12 00 31 PM

Logs:
http://0.0.0.0:8000/logs also does not connect
Logs from docker terminal:


2022-10-11 15:54:53,487 - USING:: version = False
2022-10-11 15:54:53,490 - USING:: app = /opt/monai/apps/radiology
2022-10-11 15:54:53,491 - USING:: studies = http://127.0.0.1:8042/dicom-web
2022-10-11 15:54:53,491 - USING:: verbose = INFO
2022-10-11 15:54:53,492 - USING:: conf = [['models', 'deepedit']]
2022-10-11 15:54:53,492 - USING:: host = 0.0.0.0
2022-10-11 15:54:53,493 - USING:: port = 8000
2022-10-11 15:54:53,493 - USING:: uvicorn_app = monailabel.app:app
2022-10-11 15:54:53,493 - USING:: ssl_keyfile = None
2022-10-11 15:54:53,493 - USING:: ssl_certfile = None
2022-10-11 15:54:53,493 - USING:: ssl_keyfile_password = None
2022-10-11 15:54:53,494 - USING:: ssl_ca_certs = None
2022-10-11 15:54:53,495 - USING:: workers = None
2022-10-11 15:54:53,495 - USING:: limit_concurrency = None
2022-10-11 15:54:53,496 - USING:: access_log = False
2022-10-11 15:54:53,496 - USING:: log_config = None
2022-10-11 15:54:53,496 - USING:: dryrun = False
2022-10-11 15:54:53,496 - USING:: action = start_server
2022-10-11 15:54:53,503 - ENV SETTINGS:: MONAI_LABEL_API_STR = 
2022-10-11 15:54:53,503 - ENV SETTINGS:: MONAI_LABEL_PROJECT_NAME = MONAILabel
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_APP_DIR = 
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_STUDIES = 
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_AUTH_ENABLE = False
2022-10-11 15:54:53,504 - ENV SETTINGS:: MONAI_LABEL_AUTH_DB = 
2022-10-11 15:54:53,505 - ENV SETTINGS:: MONAI_LABEL_APP_CONF = '{}'
2022-10-11 15:54:53,505 - ENV SETTINGS:: MONAI_LABEL_TASKS_TRAIN = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_STRATEGY = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_SCORING = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_TASKS_BATCH_INFER = True
2022-10-11 15:54:53,506 - ENV SETTINGS:: MONAI_LABEL_DATASTORE = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_URL = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_USERNAME = 
2022-10-11 15:54:53,507 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PASSWORD = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_API_KEY = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_CACHE_PATH = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_PROJECT = 
2022-10-11 15:54:53,508 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_ASSET_PATH = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_DSA_ANNOTATION_GROUPS = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_USERNAME = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PASSWORD = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_PATH = 
2022-10-11 15:54:53,509 - ENV SETTINGS:: MONAI_LABEL_QIDO_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_WADO_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_STOW_PREFIX = None
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_FETCH_BY_FRAME = False
2022-10-11 15:54:53,510 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CONVERT_TO_NIFTI = True
2022-10-11 15:54:53,511 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_SEARCH_FILTER = '{"Modality": "CT"}'
2022-10-11 15:54:53,511 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_CACHE_EXPIRY = 180
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_PROXY_TIMEOUT = 30.0
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DICOMWEB_READ_TIMEOUT = 5.0
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_AUTO_RELOAD = True
2022-10-11 15:54:53,512 - ENV SETTINGS:: MONAI_LABEL_DATASTORE_FILE_EXT = '["*.nii.gz", "*.nii", "*.nrrd", "*.jpg", "*.png", "*.tif", "*.svs", "*.xml"]'
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SERVER_PORT = 8000
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_CORS_ORIGINS = '[]'
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSIONS = True
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSION_PATH = 
2022-10-11 15:54:53,513 - ENV SETTINGS:: MONAI_LABEL_SESSION_EXPIRY = 3600
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_INFER_CONCURRENCY = -1
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_INFER_TIMEOUT = 600
2022-10-11 15:54:53,514 - ENV SETTINGS:: MONAI_LABEL_AUTO_UPDATE_SCORING = True
2022-10-11 15:54:53,515 - 
Allow Origins: ['*']
[2022-10-11 15:54:55,924] [997] [MainThread] [INFO] (uvicorn.error:75) - Started server process [997]
[2022-10-11 15:54:55,926] [997] [MainThread] [INFO] (uvicorn.error:45) - Waiting for application startup.
[2022-10-11 15:54:55,928] [997] [MainThread] [INFO] (monailabel.interfaces.utils.app:38) - Initializing App from: /opt/monai/apps/radiology; studies: http://127.0.0.1:8042/dicom-web; conf: {'models': 'deepedit'}
[2022-10-11 15:54:56,023] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for MONAILabelApp Found: <class 'main.MyApp'>
[2022-10-11 15:54:56,039] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_vertebra.LocalizationVertebra'>
[2022-10-11 15:54:56,041] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_vertebra.SegmentationVertebra'>
[2022-10-11 15:54:56,044] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.localization_spine.LocalizationSpine'>
[2022-10-11 15:54:56,046] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_3d.Deepgrow3D'>
[2022-10-11 15:54:56,058] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation_spleen.SegmentationSpleen'>
[2022-10-11 15:54:56,060] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepedit.DeepEdit'>
[2022-10-11 15:54:56,062] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.segmentation.Segmentation'>
[2022-10-11 15:54:56,063] [997] [MainThread] [INFO] (monailabel.utils.others.class_utils:37) - Subclass for TaskConfig Found: <class 'lib.configs.deepgrow_2d.Deepgrow2D'>
[2022-10-11 15:54:56,064] [997] [MainThread] [INFO] (main:87) - +++ Adding Model: deepedit => lib.configs.deepedit.DeepEdit
[2022-10-11 15:55:20,115] [997] [MainThread] [INFO] (lib.configs.deepedit:144) - EPISTEMIC Enabled: False; Samples: 5
[2022-10-11 15:55:20,119] [997] [MainThread] [INFO] (lib.configs.deepedit:148) - TTA Enabled: False; Samples: 5
[2022-10-11 15:55:20,126] [997] [MainThread] [INFO] (main:91) - +++ Using Models: ['deepedit']
[2022-10-11 15:55:20,128] [997] [MainThread] [INFO] (monailabel.interfaces.app:129) - Init Datastore for: http://127.0.0.1:8042/dicom-web
[2022-10-11 15:55:20,129] [997] [MainThread] [INFO] (monailabel.interfaces.app:149) - Using DICOM WEB: http://127.0.0.1:8042/dicom-web
dcmqi-1.2.4-linux.tar.gz: 20.6MB [00:01, 14.7MB/s]                                                                      
2022-10-11 15:55:21,658 - INFO - Downloaded: /tmp/tmpzvhcglyz/dcmqi-1.2.4-linux.tar.gz
2022-10-11 15:55:21,658 - INFO - Expected md5 is None, skip md5 check for file /tmp/tmpzvhcglyz/dcmqi-1.2.4-linux.tar.gz.
2022-10-11 15:55:21,659 - INFO - Writing into directory: /tmp/tmp8shuq9hg.
[2022-10-11 15:55:22,877] [997] [MainThread] [INFO] (monailabel.datastore.dicom:62) - DICOMWeb Datastore (cache) Path: /root/.cache/monailabel/dicom/488fca1f7f3f98331f6f7756beca0d35; FetchByFrame: False
[2022-10-11 15:55:22,878] [997] [MainThread] [INFO] (monailabel.datastore.dicom:63) - DICOMWeb Convert To Nifti: True
[2022-10-11 15:55:22,885] [997] [MainThread] [INFO] (monailabel.datastore.local:128) - Auto Reload: True; Extensions: ('*.nii.gz', '*.nii')
[2022-10-11 15:55:22,892] [997] [MainThread] [INFO] (monailabel.datastore.local:574) - Invalidate count: 0
[2022-10-11 15:55:22,892] [997] [MainThread] [INFO] (monailabel.datastore.local:148) - Start observing external modifications on datastore (AUTO RELOAD)
[2022-10-11 15:55:22,896] [997] [MainThread] [ERROR] (monailabel.datastore.local:174) - Failed to start File watcher. Local datastore will not update if images and labels are moved from datastore location.
[2022-10-11 15:55:22,896] [997] [MainThread] [ERROR] (monailabel.datastore.local:178) - [Errno 38] Function not implemented
[2022-10-11 15:55:22,897] [997] [MainThread] [INFO] (main:117) - +++ Adding Inferer:: deepedit => <lib.infers.deepedit.DeepEdit object at 0x411437f490>
[2022-10-11 15:55:22,897] [997] [MainThread] [INFO] (main:117) - +++ Adding Inferer:: deepedit_seg => <lib.infers.deepedit.DeepEdit object at 0x411437f4f0>
[2022-10-11 15:55:22,898] [997] [MainThread] [INFO] (main:173) - {'deepedit': <lib.infers.deepedit.DeepEdit object at 0x411437f490>, 'deepedit_seg': <lib.infers.deepedit.DeepEdit object at 0x411437f4f0>, 'Histogram+GraphCut': <monailabel.scribbles.infer.HistogramBasedGraphCut object at 0x411437f9d0>, 'GMM+GraphCut': <monailabel.scribbles.infer.GMMBasedGraphCut object at 0x411438ebe0>}
[2022-10-11 15:55:22,899] [997] [MainThread] [INFO] (main:186) - +++ Adding Trainer:: deepedit => <lib.trainers.deepedit.DeepEdit object at 0x411438eee0>
[2022-10-11 15:55:22,900] [997] [MainThread] [INFO] (monailabel.utils.sessions:51) - Session Path: /root/.cache/monailabel/sessions
[2022-10-11 15:55:22,900] [997] [MainThread] [INFO] (monailabel.utils.sessions:52) - Session Expiry (max): 3600
[2022-10-11 15:55:22,901] [997] [MainThread] [INFO] (monailabel.interfaces.app:467) - App Init - completed
[2022-10-11 15:55:22,903] [timeloop] [INFO] Starting Timeloop..
[2022-10-11 15:55:22,903] [997] [MainThread] [INFO] (timeloop:60) - Starting Timeloop..
[2022-10-11 15:55:22,908] [timeloop] [INFO] Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x411ce14310>
[2022-10-11 15:55:22,908] [997] [MainThread] [INFO] (timeloop:42) - Registered job <function MONAILabelApp.on_init_complete.<locals>.run_scheduler at 0x411ce14310>
[2022-10-11 15:55:22,909] [timeloop] [INFO] Timeloop now started. Jobs will run based on the interval set
[2022-10-11 15:55:22,909] [997] [MainThread] [INFO] (timeloop:63) - Timeloop now started. Jobs will run based on the interval set
[2022-10-11 15:55:22,910] [997] [MainThread] [INFO] (uvicorn.error:59) - Application startup complete.
[2022-10-11 15:55:22,913] [997] [MainThread] [INFO] (uvicorn.error:206) - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)```


@jlvahldiek
Copy link
Contributor

I can confirm that I discovered the same behavior on macOS when running:

docker run --rm -ti --ipc=host --net=host projectmonai/monailabel:latest bash

# inside docker container:
monailabel apps --download --name radiology --output apps
monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

MONAILabel, OHIF and Orthanc all are then not reachable using 'http://127.0.0.1:8000' or 'http://127.0.0.1:8000/ohif' or 'http://127.0.0.1:8042'.

I was able to get MONAILabel up using:

docker run --rm -ti --ipc=host -p 8000:8000 -p 8042:8042 projectmonai/monailabel:latest bash

# inside docker container:
monailabel apps --download --name radiology --output apps
monailabel start_server --app apps/radiology --studies http://127.0.0.1:8042/dicom-web --conf models deepedit

But in this case Orthanc and OHIF are not reachable. Investigating the container, Orthanc does not get started...

@SachidanandAlle
Copy link
Collaborator

SachidanandAlle commented Oct 11, 2022

First thing.. you need GPUS.. without that monailabel is not complete.. you can run, but at the end most of the features won't be supported without GPU..

Second.. I see you are trying 0.0.0.0 (in some cases.. you should try 127.0.0.1:8000 instead.. depends on the resolve)
As i see @jlvahldiek already mentioned about port binding for docker in mac.. --ipc=host --net=host possibly won't work in Mac.. so you might have to bind the port explicitly

FYI.. monailabel is tested only for Windows and Ubunutu env..

otherwise logs are good.. 2nd thing.. when u start the server

Third.. Orthanc is not part of monailabel (its a separate thing).. due to license, it can be part of Monailabel..
Please read the docs here.. most of these are well documented..
https://github.com/Project-MONAI/MONAILabel#ohif-radiology

@jlvahldiek
Copy link
Contributor

Thanks for clarification, @SachidanandAlle.

These lines should perhaps be removed, as they imply that the MONAILabel docker image ships with Orthanc included ...

MONAILabel/Dockerfile

Lines 37 to 46 in fb8d047

# Add Orthanc
RUN if [ "${ORTHANC}" = "true" ] ; then \
apt-get update -y && apt-get install orthanc orthanc-dicomweb plastimatch -y \
&& service orthanc stop \
&& wget https://lsb.orthanc-server.com/orthanc/1.9.6/Orthanc --output-document /usr/sbin/Orthanc \
&& rm -f /usr/share/orthanc/plugins/*.so \
&& wget https://lsb.orthanc-server.com/orthanc/1.9.6/libServeFolders.so --output-document /usr/share/orthanc/plugins/libServeFolders.so \
&& wget https://lsb.orthanc-server.com/orthanc/1.9.6/libModalityWorklists.so --output-document /usr/share/orthanc/plugins/libModalityWorklists.so \
&& wget https://lsb.orthanc-server.com/plugin-dicom-web/1.6/libOrthancDicomWeb.so --output-document /usr/share/orthanc/plugins/libOrthancDicomWeb.so \
&& service orthanc restart; fi

@jlvahldiek
Copy link
Contributor

@adwaykanhere, my current workaround is that I am running a fully-configured Orthanc docker container next to a MONAILabel docker container. Works great...

@adwaykanhere
Copy link

Thanks a lot, @jlvahldiek How are you able to connect the MONAILabel docker to OHIF via Orthanc?

@adwaykanhere
Copy link

@SachidanandAlle 127.0.0.1:8000 also does not work for MacOS

@jlvahldiek
Copy link
Contributor

Thanks a lot, @jlvahldiek How are you able to connect the MONAILabel docker to OHIF via Orthanc?

@adwaykanhere, I will work on a tutorial setting up all three with Docker, probably will be published in a couple of days. If you can't wait please contact me directly...

@diazandr3s
Copy link
Collaborator

@SachidanandAlle 127.0.0.1:8000 also does not work for MacOS

Hi @adwaykanhere,

MONAI Label needs GPUs to work - It hasn't been tested/doesn't work on macOS.
You could start the MONAI Label server on a Linux or Windows machine

Screenshot from 2022-10-12 17-18-07

and then connect to it using OHIF/Slicer from your macOS machine.

Hope this helps,

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

5 participants