Installing the ML Beta Docker-Compose Release

The distribution of XNAT ML (Beta) in a Docker Compose setup includes all core components of the demonstration release. XNAT runs in a Docker container, with Traefik set up to handle front-end routing to temporary model training containers. 

In this environment, the XNAT Container Service must be pointed to the external Docker Server that is running XNAT as its "host".

Setup

Open a Terminal window, and clone the xnat-docker-compose repository, checking out the XNAT ML (Beta) release.

$ git clone https://github.com/NrgXnat/xnat-docker-compose.git
$ cd xnat-docker-compose
$ git checkout features/dependency-mgmt

The dependency management functionality uses a manifest file to determine the war and plugins to be used for the deployment. The manifest for the ML deployment contains the following:

{
    "version": "ML-BETA",
    "base": "xnat-data",
    "webapps": "org.nrg.xnat.web:xnat-web:ML-BETA -> ROOT.war",
    "plugins": [
        "org.nrg.xnatx.plugins:batch-launch:ML-BETA",
        "org.nrg.xnatx.plugins:container-service:ML-BETA:fat",
        "org.nrg.xnatx.plugins:dicom-query-retrieve:ML-BETA:xpl",
        "org.nrg.xnatx.plugins:xnatx-clara:ML-BETA",
        "org.nrg.xnatx.plugins:xnatx-collection:ML-BETA",
        "org.nrg.xnatx.plugins:ohif-viewer:ML-BETA:fat"
    ]
}

The -> operator in the webapps element indicates that the downloaded file should be mapped to the indicated name. In this case, xnat-web-ML-BETA.war will be downloaded, then renamed to ROOT.war.

There is an example version of the manifest file in this branch. Copy that to a file named "manifest.json"

$ cp sample.manifest-xnat-ML-BETA.json manifest.json

This copy step is optional. You can also specify the -Pmanifest=file-name.json option when building the Docker images with ./gradlew in the next step.

Installation

To bring up your XNAT instance with all dependencies, run the following commands:

$ ./gradlew composeBuild
$ docker-compose up --detach

This builds the Docker images based on the contents of the file manifest.json in the working folder. As noted above, you can also specify which file to use as a manifest when building the Docker images:

$ ./gradlew composeBuild -Pmanifest=sample.manifest-xnat-ML-BETA.json
$ docker-compose up --detach

You can tail the server startup process log by running the following command:

$ docker-compose logs -f --tail=20 xnat-web

When your XNAT server has finished starting up, you can access your XNAT in the browser at http://localhost. See DevOps Quick Reference for Containerized XNATs for other helpful tips in managing this environment.

Troubleshooting

If you run into issues with your development build, or if you have previously run a version of XNAT Docker-Compose, you may need to reset your Docker environment. See: Rebuilding Your Docker Compose Environment

$label.name