Hi, I’m looking for a way to create a basic Slicer application on the web using trame-slicer. Ideally, I think I’d like to run it in a docker container to make it somewhat portable. Is there an existing, recommended docker image that I could base my application on? I know there is a trame image but I believe that trame-slicer requires the slicer python interpreter. Sorry I’m fairly new to all of this
Hi @rlhisey,
There is no official trame-slicer docker image yet, but there is an open draft PR open on the subject to have a minimal dockerfile recipe to get people started on the deployment.
The docker image doesn’t rely on the Slicer environment but on the VTK MRML wheel which corresponds to the core 3D Slicer classes and compiled for Python 3.10 on Windows and Linux x64.
These wheels are compatible with deployment for cloud / k8s and desktop apps using PyInstaller / Tauri.
What kind of application are you looking to build?
Best,
Thibault
Thanks! Right now I’m just doing some investigation to see if it’s possible to run some basic Slicer functionality through a web interface mostly for my own learning. I’ll start with the docker file you’ve mentioned.
I took a look at the dockerfile PR mentioned above and running the medical_viewer example throws `ImportError: cannot import name ‘vtkMRMLLayerDMObjectEventObserverScripted’ from ‘slicer’ (/usr/local/lib/python3.10/site-packages/slicer/init.py)` I know the PR is still in draft so I may need to do some additional debugging, just wondering if there is something obvious I’m missing.
Hi @rlhisey,
This problem is likely due to an outdated vtk-mrml wheel being installed. Make sure you’re using the latest in the Docker image which should be this one.