Docker image for `nightly-master`

Hello everyone,

We’d like to introduce a new docker image unnmdnwb3/slicer3d-nightly, which offers an environment to test extensions for Slicer 4.11.x (which supports Python 3 ). The image is based on Slicer’s branch nightly-master (fixed on commit 82f0c50) and shares the base-image slicer/buildenv-qt5-centos7 with the official Slicer docker images.

For more information, please consult the following sources:

Detailed information and the Dockerfile can be found on the repo itself.

Please consider leaving feedback (either here or on the repo), so that we can improve and adjust our current solution!

Background

We’re a team from Opendose working on an extension for Slicer. Our goal is to provide software that complies to high standards regarding reliability and correctness. Thus, testing of our code is a key-stone of our effort. To facilitate contributing and to enhance our software quality, an automated CI-Pipeline has been built, using Gitlab-CI and Docker.

Considering the eventual upgrade to Slicer 5 and therefore the associated move to Python 3, we wanted to develop our extension for Slicer 4.11.x, which supports Python 3.

As far as we know, the existing official docker images are currently focussed on supporting Slicer 4.10.x and are based on the master branch, which only supports Python 2.

Thus, we created unnmdnwb3/slicer3d-nightly.

We hope that we can support other teams with this image in their efforts to facilitate testing and build robust software. If you have any questions, I’m more than happy to address them!

2 Likes

This is outstanding. Thanks for working on this :pray:

As far as we know, the existing official docker images are currently focussed on supporting Slicer 4.10.x and are based on the master branch, which only supports Python 2 .

To clarify, the slicer/slicer-base image is built and published daily. It is based of the “nightly” master branch and it includes python3 and Qt5.

To support extension testing, i suggest we “resurrect” the slicer/slicer-build image, this should allow testing of both python and c++ based Slicer extension.

@unnmdnwb3 Is it something you could help with ?

In the mean time, @thewtex could you transfer the SlicerDocker project to the Slicer organization ?

2 Likes

Hi @jcfr, thank you for your support and the kind words! Really appreciated! :slight_smile:

Ah sorry, seems like I messed something up. I’ve tried to get the python version from slicer/slicer-build but always got this back:

/usr/src/Slicer-build/python-install/bin/SlicerPython -c 'import sys; print(sys.version)'
> 2.7.13 (default, Jan 29 2018, 03:09:51) 

Do you know how I can find the python3 executable on this image?
We could then definitely pick the best parts from both images and merge them!

Yes sure. Is there anything specific, with which I can assist you? Or do you mean the whole process?

By the way, we’ve also built a CI-Pipeline based on gitlab-ci, using the unnmdnwb3/slicer3d-nightly image. Are you interested in having a template for the CI-CD integrated into SlicerWizard?
This would probably only take a small effort.

If you’re interested, I’d propose to integrate a small template for gitlab-ci, circle-ci and travis?

Yes, we would be definitely interested. Please send a pull request with your proposed changes to the Slicer/Slicer github repository. Extension templates are defined here.

1 Like

Done! :slight_smile:

GitHub - Slicer/SlicerDocker: Build, package, test, and run 3D Slicer and Slicer Extensions in Docker.