Skip to content

Integration with Xant for data scientist using jupyter hub

AHarouni edited this page Apr 18, 2025 · 2 revisions

Here we describe how data scientist can run training and inference on xnat data without any help from IT. This is achieved using xnat jupyter hub plugin. We will walk you through setting up:

  • Xnat jupyter plugin and installing monai label gpu enabled image
  • Running monai label with reverse proxy so xnat can call into it
  • Container service to run inference on all data in a project

1. Setup

1.1 XNAT Jupyter Integration

Xnat jupyter integration is very well documented here. You need to check the compatibility matrix then download the plugin into the xnat plugin folder. Your IT should follow the installation instructions as here. Once installed correctly xnat admin should be able to follow instructions here to set up the jupyter environments. Xnat instructions makes you test with the basic data scientist container. You should pull this image xnat/datascience-notebook and configure jupyter environment. Next you should test that you can launch jupyter instance form xnat and see the data folders

1.2 Adding monai label container

The above setup enables you to see your xnat data. However, you don’t have access to gpus or monai label. For this you need to pull image from aharouni334/xnat_monailabel_codeserver from docker hub and setup the jupyter environment for it following steps here. This container has monai core 1.4, monai label 0.8.4 as well as vscode enabled. Once everything is setup correctly you can launch a jupyter lab instance using image above to get access to xnat data, monai label, and your gpu as shown below image You also have access to vscode in the browser so you can edit your files easily to write your monai label apps. Your admin would have need to configure the workspaces in the xnat jupyter plugin so you have persistent storage. image

2. Starting monai label with reverse proxy

You should start monai label server by following steps in this integration with xnat wiki This would start monai label server on port 8000, However, this port is internal to the jupyter instance you are in. In order to expose this port we have installed a reverse proxy in the jupyter container. To check that monai label server is running try the url http://basurl/proxy/8000/info/ the base url should be something as http://your_xnat_ip/jupyterhub/user//<random_number_as_20250418T190212372Z>

See Also