At today’s MONAILabel workshop 100+ people could see how amazingly well Slicer works in a web browser using Amazon AppStream. For those who missed, here is a short demo:
Questions are already coming in if this is generally available and about how this can be set up. @pieper can you answer this question or ask someone from AWS to answer here?
Yes, this is all just off-the-shelf AWS AppStream 2.0 and the regular Slicer build. Qing Liu from AWS and I have been testing this out for a while and have been planning to make a Slicer-specific blog post to explain the details. Yesterday was the first time I had seen it scaling it up to so many users.
Get Slicer Running on AWS AppStream 2.0 Under Amazon Linux
Further to this thread… I spent quite a bit of time over the last several days figuring out how to get Slicer running on AWS AppStream 2.0 on an Amazon Linux instance (versus a Windows instance). I thought I’d post my solution here to help any others who might be interested in doing this.
First, create an AppStream Image Builder instance. (If you need more details ping me, or post here. There are lots of instructions online). In my AWS zone (Canada Central), I had to opt for a stream.graphics-pro.4xlarge instance. Pricing info. (Make sure you check the “Internet Access” box in the Networking config panel to give your instance access to the internet). Launch this instance.
Use the browser to download the Slicer install package (.tar.gz). As of this writing that file is ‘Slicer-5.2.2-linux-amd64.tar.gz’ (you could also use wget or curl to download the file directly from the command line, and skip the browser install if you want)
Unpack this file eg: “tar xzvf Slicer-5.2.2-linux-amd64.tar.gz”. This will create a directory called ‘Slicer-5.2.2-linux-amd64’ with Slicer inside it. I’ll assume this in in your home folder.
Install the missing libraries Slicer needs to run:
Thanks for taking the time to write a detailed summary
Since we bundled qt libraries, do you know which Qt library or plugin was missing ? I would like to understand if there is anything we would need to fix on the packaging side.
I initially got the following error when launching Slicer on Amazon Linux:
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
The key to finding the problems was to set the Qt debug environment variable:
export QT_DEBUG_PLUGINS=1
Then, launching Slicer produced Qt debug messages. These revealed that there were errors loading a library called “libqxcb.so"
This library is part of the Slicer build, and is located in "lib/QtPlugins/platforms” inside the Slicer install dir.
Next, I checked what dependencies this library had by executing the following from the Slicer install dir:
ldd ./lib/QtPlugins/platforms/libqxcb.so
This produced a lot of output. I’ve edited this to show only the missing dependencies…
libQt5XcbQpa.so.5 => not found
libQt5Gui.so.5 => not found
libQt5DBus.so.5 => not found
libQt5Core.so.5 => not found
libxcb-icccm.so.4 => not found
libxcb-image.so.0 => not found
libxcb-keysyms.so.1 => not found
libxcb-render-util.so.0 => not found