BishopWolf / slicer3d-docker

slicer dockerfile builds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker Image CI

Slicer3D-Nightly

This is the unofficial image for the Slicer3D nightly-master branch.

This repository contains the Dockerfile to build the image slicer3d-nightly - a testing environment for Slicer3D Nightly Build and therefore Slicer 5.1. The image can be used by project-teams working on extensions for Slicer3D.

In contrast to the official Slicer images, this image is based on the nightly-build branch of Slicer - and hence explicitly not on the stable master. Therefore, this image supports python3.

However, the slicer3d-nightly is based on the official qt5-centos7 base-image, which the official Slicer-images use as well.

Prerequisites

To be able to use slicer3d-nightly locally, you have to have Docker installed. Please download Slicer from their official website and build it manually.

Build

  • Register to dockerhub doing docker login
  • Build image assigning tag docker build /path/to/Dockerfile -t <docker-user>/<build-name>:tag
  • Push image docker push <docker-user>/<build-name>:tag

Installation

To use the image, you have to pull the newest version first:

docker pull bishopwolf/slicer3d-nightly:latest

To run it, use the following command:

docker run -dit bishopwolf/slicer3d-nightly:latest

If you run the following command, you get an overview over all your container instance and can retrieve the container's id:

docker ps -a

To get access to the container's bash, use:

docker exec -it <container-id> /bin/bash

If you don't use the container anymore, feel free to delete it:

docker ps -a
docker kill <container-id>
docker rm <container-id>

If you even want to delete the image itself, just use:

docker images
docker image rm <image-id>

Please note though, that removing an image can not be undone. You would have to download the whole image from scratch again. Also, if you have a running container based on the image you want to remove, you have to remove it with force -f.

Supported Components

This image inherits several components, which are used to build Slicer and its dependencies.

This list includes, but is not limited to:

  • gcc
  • g++
  • git
  • cmake
  • make
  • wget
  • Qt5
  • Xvfb
  • Xorg

Limitations

Please be aware that this docker image is work-in-progress! The image should therefore only used in testing. The author does not accept any responsability for using the code.

Additionally, the image is currently fixed to commit 82f0c50. Future versions of the image should be updated, whenever the branch is enhanced - currently though the image remains static. However, currently all versions have to build locally, since dockerhub enforces some resource-limits which are way to low for building Slicer from scratch. Therefore, the bulding process will possibly moved to travis, since they offer better specs.

Warning

Building the underlying Dockerfile takes quite some time to build locally (make -j 1 needed 4h 17m 24s). In order to successfully build the image, docker possibly needs more ressources than set by default. The following configuration should work for make -j 6:

CPUs: 6
Memory: 4 GiB
Swap: 2 GiB

If you experience crashes such as the following one, please increase the resources for docker:

g++: internal compiler error: Killed (program cc1plus)

About

slicer dockerfile builds

License:MIT License


Languages

Language:Dockerfile 100.0%