The distribution of XNAT ML 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".
Open a Terminal window, and clone the xnat-docker-compose repository, checking out the features/dependency-mgmt branch.
$ 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": "1.0",
"base": "xnat-data",
"webapps": "org.nrg.xnat.web:xnat-web:1.8 -> ROOT.war",
"plugins": [
"org.nrg.xnatx.plugins:batch-launch:0.4.0",
"org.nrg.xnatx.plugins:container-service:3.0.0:fat",
"org.nrg.xnatx.plugins:dicom-query-retrieve:ML-BETA:xpl",
"org.nrg.xnatx.plugins:xnatx-clara:1.0",
"org.nrg.xnatx.plugins:xnatx-collection:1.0",
"org.nrg.xnatx.plugins:ohif-viewer:3.0.0:fat"
]
}
The -> operator in the webapps element indicates that the downloaded file should be mapped to the indicated name. In this case, xnat-web-1.8.0.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.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.
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.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.
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