Skip to content

Docker recipe to configure and spin up a medical imaging informatics platform

Notifications You must be signed in to change notification settings

rih3d/cirr-docker

Repository files navigation

CIRR UP!

Derek Merck derek_merck@brown.edu Rhode Island Hospital

Configures and spins up a Docker-based open-source1 medical imaging informatics platform. Originally developed to support the RIH Clinical Imaging Research Repository (CIRR).

Services

  • Clinical/PHI Facing Repository - Orthanc 1.0 on 4280 (HTTP/REST), 4242 (DICOM)
  • Clinical/PHI Facing Receiver - Orthanc on 4380 (HTTP/REST), 4342 (DICOM)
  • Research/Anonymized Facing Repository - XNAT 1.6.5 on 8080 (HTTP/REST), 8042 (DICOM)
  • Database - Postgresql 9.5 on 3432 (SQL)
  • Data Orchestration - In progress [](Tithonus on 6080 (HTTP/REST))
  • Log Monitoring - Splunk Lite on 1580 (HTTP/REST), 1514 (syslog)

Dependencies

Configurations

Warning: once data has been ingested, do not use docker-compose down, or you will drop the data volume! Furthermore, do not use docker-compose up with the xnat service; use docker-compose up --no-recreate or it will fail because it can't rebuild itself if the database already exists.

bootstrap.py will read a file called docker-compose.shadow.yml and use any override variables or config information provided there. All generated configuration files are similarly tagged as "shadow" and should not be indexed by git because they will contain plain-text account credentials. Depending on which variables are used, docker-compose.shadow.yml may not be necessary to include when creating the containers themselves.

Postgres

Orthanc and XNAT services rely on Postgres. The Postgres service has to be available before Orthanc or XNAT can be configured.

$ docker-compose up -d postgres

Orthanc w Postgres and Persistent Compressed Data Storage

$ python bootstrap.py orthanc  # Sets up orthanc.json from template, adds db
$ docker-compose up -d orthanc

Orthanc with receiver proxy:

$ python bootstrap.py orthanc orthanc-receiver
$ docker-compose up -d orthanc orthanc-reciever

The additional DICOM receiver can be used as a proxy to accept DICOM transfers and queue them for the main clinical-facing repository. The main repo slows down considerably as the DB grows large, particularly if compression is on.2

An isolated Orthanc using a Postgres backend can be created directly using docker-compose from the orthancp-docker directory. That version has a much simpler configuration process, and by default it will create services on a separate network.

XNAT w Postgres and Persistent Data Storage

$ python bootstrap.py xnat    # Initializes config from template, creates image, drops db if it exists
$ docker-compose up xnat

XNAT and Orthanc with a Splunk Log Handler

$ python bootstrap.py orthanc xnat
$ docker-compose up orthanc xnat splunk

Complete CIRR Configuration

$ python bootstrap.py orthanc orthanc-receiver xnat
$ docker-compose up

Administration

To inspect the data or logs, mount the data volumes on another container.

$ docker-compose up -f docker-compose.admin.yml admin

Or manually for a single service:

$ docker-compose run -it --volumes-from orthanc ubuntu /bin/bash

To perform a data backup, run admin or otherwise mount the volumes and use tar.

$ docker-compose run -f docker-compose.admin.yml admin tar zcvf /backup/postgres.tar.gz /var/lib/postgresql/data
$ docker-compose run -f docker-compose.admin.yml admin tar zcvf /backup/xnat.tar.gz /var/lib/xnat/data

Acknowledgements

Uses Docker images from:

Note

Run this command to configure your shell to use docker-compose on OSX or Windows:

$ eval "$(docker-machine env default)"

License

MIT


1: Splunk is not open source, but Splunk Lite will work for this volume of logs and it is free. Replace it with you open-source syslog server of choice if necessary.⤴️

2: On a reasonable machine, we measured about 20 images/second in an empty, uncompressed repo, but only about 1.5 scans/sec in a repo w 100k instances and compression on.⤴️

About

Docker recipe to configure and spin up a medical imaging informatics platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published