How to run Slicer on the cloud and access in a web browser

We just finished the first day running SlicerMorph workshop on the Cloud. This note is for sharing the experience with other folks interested in running Slicer as an remote interactive desktop application (not thru Jupyter notebooks or binder).

  1. We are using this docker GitHub - SlicerMorph/SlicerMorphCloud: Docker for running SlicerMorph on Cloud, which provides a simple openbox WM, with a file browser, Slicer, R/Rstudio and Firefox. (same docker can be used for GPU accelerated setups with Nvidia cards too). Docker image is huge though (about 25GB).

  2. For every 10-12 students, we have spun a HB120rs_v2 node on Azure (480GB of RAM, 120 non-threaded cores. No GPU. About $3.5/h). Each node also have a 1.2TB persistent storage as their work area and workshops data.

  3. We spun individual containers for every attendee. Every user gets a one-time use password and a unique URL (both of which unfortunately changes if have to restart their instance).

  4. They use Firefox installed inside the docker to bring data in (e.g., from MorphoSource or from their dropbox account).

  5. In my experience, dedicated TurboVNC clients gives a much more interactive experience then noVNC running in a web browser (both in terms of bandwidth usage and image quality).

  6. User experience is highly dependent on their bandwidth and connection quality (for example for me it is as good as being in the lab that use LAN settings). We could have improved this a bit more by spinning nodes in other geographical areas and cluster the people accordingly. Next round we might do that. And if users are beyond firewall, ephemeral tcp ports we use sometimes are blocked and unfortunately that’s not something we can do about (apart from finding a better solution for having distinct accounts for everyone).

Today, out of ~40 users only 1-2 needed their docker instance restarted (which is mostly due to a design issue where if you exit out of the WM session by choosing Exit from window manager’s popup menu, it kills the VNC session. We need to remove that menu). And I ran my entire tutorial (~4h) using only the cloud instance.

But right now usage is lightweight. Tomorrow is segmentation and we will see if we encounter any more issues.

Overall, we managed to cover the materials much faster, because we didn’t get bogged down strange OS specific issues (locales, folders with non-ascii characters, desktops hijacked by cloud file share, missing libraries) that we had to troubleshoot over zoom connection. To be clear, these issues continue to happen on desktops (as we encourage them to have a local computer as a backup) but didn’t take it away from workshop time.

Overall, the experience can be improved with more careful planning (this was our first attempt, so we are also learnign). But Slicer on the cloud as an interactive application, is a very real thing.

CONTAINER NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK
04fe810bc45c 0.01% 1.162GiB / 100GiB 1.16% 423MB / 3.08GB 778MB / 401MB 118
7367b651ded8 0.07% 5.619GiB / 100GiB 5.62% 3.08GB / 4.26GB 17.3MB / 309MB 727
9a29d3cc4f67 0.00% 56.1MiB / 100GiB 0.05% 60.8kB / 691kB 41kB / 0B 55
3bb70ca00cb0 0.05% 1.025GiB / 100GiB 1.02% 75.7MB / 572MB 222MB / 67.8MB 130
850f145587ea 0.09% 886.3MiB / 100GiB 0.87% 443MB / 806MB 10.8MB / 416MB 302
545cc4fcb27c 0.09% 1.004GiB / 100GiB 1.00% 36.8MB / 42.8MB 11.5MB / 86.8MB 236
307d4b87f8ea 0.05% 3.378GiB / 100GiB 3.38% 1.5GB / 2.18GB 239MB / 493MB 546
065a1b06903c 5.33% 1.902GiB / 100GiB 1.90% 1.97GB / 2.65GB 17.1MB / 508MB 649
8e674178b5d7 0.06% 3.557GiB / 100GiB 3.56% 544MB / 3.46GB 12.7MB / 289MB 361
234ae464a44f 0.05% 1.376GiB / 100GiB 1.38% 3.25GB / 978MB 4.72GB / 303MB 275
ccd3167e3bbd 2.32% 1.489GiB / 100GiB 1.49% 482MB / 1.48GB 24.3MB / 174MB 512
baa4337b35ca 0.05% 1.321GiB / 100GiB 1.32% 425MB / 1.33GB 568MB / 343MB 278
5 Likes