I’am a scientist and working with Slicer build inside a docker image but I want make some upgrade in a workflow and add SlicerJupyter extension. I have a dream that I am preparing a docker image for my friends in team. In last few days I did some research about your solution with docker but I got lost in this topic. What need I to create a dream workflow:
Create docker image with build version Slicer Qt5 (always need builded version because I working with own extensions
Build and install to Slicer SlicerJupyter extension(this will allow me to accelerate my work considerably and simply - JUPYTER is awesome)
Redistribute created image.
Now I have only working version with Slicer Qt4 but for this version I can’t build SlicerJupyter.
Have you got some suggestion how I can improve that workflow? What image (for example from https://github.com/thewtex/SlicerDocker) should I use? And what do if my computer has Nvidia and other ATI or Intel graphic cards? Should I install all drivers?
You can have a look at my dockerfiles. It should be no problem to get a latest nightly build and install the jupyter extension in a dockerfile. Then you can push the result back to dockerhub or other repository.
This will provide a software rendering layer with vnc access for the browser (not GPU accelerated but still typically quite usable).
Thank you for your reply. I have got your solution before and additionaly I have installed X11 and nvidia drivers inside. Then connect to container with volume /tmp/X11 and share $DISPLAY. Works great but now I have simplier solution as I think:
I get out from docker packed Slicer nightly build and packed SlicerJupyter and working on this. Then I have gave a chance for https://github.com/Slicer/SlicerBuildEnvironment: build Slicer and SlicerJupyter but with this envoronment I dont know why Slicer (when I connect to SlicerJupyter) has 100% CPU usage.
Well now I have working nightly Slicer from pieper/SlicerDockers extracted and I build my extension through SlicerBuildEnvironment and copy libs.
I have been working with Docker and Slicer around 2 years and I installed packages in the docker by trial and error (I have never successfully compile Qt 4 and 5). Probably it’s nothing revealing:
I use Ubuntu 16.04 image(with 18 I have compile errors),
Explanation of some parameters:
-v /dev/:/dev/
I need this volume because I use sensors on /dev/ttyACM*
-e DISPLAY=$DISPLAY\
-v /tmp/.X11-unix/:/tmp/.X11-unix:ro\
It allows me to run GUI programs like Slicer
Now as I said before I packed Slicer and SlicerJupyter and working with it outside the docker on the host. JupyterLab is my current IDE.
Remember that when you are move Slicer executables(for example working on a packaged version) you need to change paths in this two files: kernel.json and AdditionalLauncherSettings.ini
It is great that you find Slicer and SlicerJupyter useful. Thanks for sharing information about how your setup works.
Note that Slicer can install when you click “Install Slicer kernel in Jupyter” then it updates the path in the kernel file and installs it. I’ve updated JupyterKernel module to make this feature available from Python (so that you can automate it as part of the installation process).
If you package the extension and install the extension from file it using the extension manager (by calling slicer.app.extensionsManagerModel().installExtension()) then you don’t need additional launcher settings, because all the libraries are installed into standard locations where Slicer can find them automatically.
I always do what you wrote, but it doesn’t update kernel.json. After click “Install Slicer kernel in Jupyter” it fills the template with paths to SuperBuild/Slicer-build not to for example Slicer-2018.08.20-amd64/. Tested few times. I give a try for slicer.app.extensionsManagerModel().installExtension(), because can’t install builded and packed SlicerJupyter through GUI extension manager.
Maybe I will find some time in a break from my doctorate.
Is this an installed Slicer or a custom-built Slicer run from the build tree?
Is this an SlicerJupyter package installed or a custom-built SlicerJupyter left in the build tree?
I’ve updated SlicerJupyter with an option to use a timer instead of watching socket changes. This option (JUPYTER_POLL_USING_TIMER) is enabled on Windows by default. Could you check if you build SlicerJupyter with this option enabled then your 100% CPU usage problem is resolved?
Hi andras,
I ran external python script with anaconda env using check_output through slicer scripted module. It was running fine last time but it is now not returning to slicer.
The external python script is running but at the end a pop up window with forcequit comes. slicer crash…
When I open slicer using terminal. The terminal window is showing
Error response from daemon: No such container: greedy_elephant
Error: No such container: greedy_elephant
Error response from daemon: No such container: greedy_elephant
Error response from daemon: removal of container greedy_elephant is already in progress