This year's instantiation of Radiology-In-The-Cloud moves the existing ChRIS architecture to a docker-based version.
Fundamentally, ChRIS (Children's Research Integration System) is a combination of web-based data storage front-end and a workflow manager that allows multiple possible configurations (such as cluster, remote, or local) for image processing back-ends (utilizing industry standard programs such as Freesurfer). More information on the details of ChRIS are available at the site for Boston Children's Hospital's Fetal-Neonatal Neuroimaging and Developmental Science Center, which has its own Git Repository.
Last year's Cloud Computing class integrated the existing ChRIS front and back-ends with a [python-based utility] (https://github.com/BU-EC500-SP15/rad-cloud) for scheduling ChRIS jobs on a cluster (in their case, the Mass Open Cloud).
This year's Radiology-In-The-Cloud group takes things in a slightly different direction - we are using Docker containers to create a more flexible means of hosting the ChRIS back end. Dockers use lightweight containers running in a command line environment according to the open containers standard. This implementation has many potential advantages including good isolation and scalability. In particular, they provide a quick means of controlling and updating dependencies without tinkering with a host's file system, and there is a unified system for pulling and pushing images and updates.
There are two ways in which you can build an instantiation of the system we have established on the Mass Open Cloud, but it depends on whether you are going to build from the (established version of ChRIS)[https://github.com/FNNDSC/chrisreloaded] or the new portable version. If you are going to build from the portable version, you will need to obtain the virtual disk image and additional files from them.
What follows is a precis of the the ChRIS portable installation instructions. We assume that you won't be running this off of a USB stick (although if you do, we suggest that you use a much larger one than the 8GB they suggest!)
Initial setup - Adapted from the ChRIS Portable spec
The extra.tgz archive contains the ChRIS data and users directories. Unpack these directories where ever convenient on the host file system, e.g.
cd ~/
mkdir chris
cd chris
tar xvfz ~/Downloads/extra.tgz
where we assume the extra.tgz is in the ~/Downloads directory.
The cannonical version of ChRIS portable is intended to run a standard VirtualBox vdi file configured with 2GB RAM and 2 CPUs.
However, a Dockerized instantiation of ChRIS is going to require significantly more space. This is due to the fact that the main utility that the plugins use, Freesurfer, is a fairly large package (8GB), and sadly this is a non-negotiable investment.
Set the following Port Forwards:
Host Port | Guest Port |
---|---|
2222 | 22 |
8001 | 80 |
8042 | 8042 |
4242 | 4242 |
8888 | 8888 |
Select the "Chris System" login and use chris321 as the password.
In the ChRIS VM, you will note that the data and users directories are dead symbolic links:
# In the ChRIS VM!
cd ~/
ls -ld data users
will result in
[chris@chris-portable:x86_64-Linux]~$>ls -ld data users
lrwxrwxrwx 1 chris chris 42 Dec 11 17:32 data -> /mnt/kyon/Users/rudolph.pienaar/chris/data
lrwxrwxrwx 1 chris chris 43 Dec 11 17:32 users -> /mnt/kyon/Users/rudolph.pienaar/chris/users
[chris@chris-portable:x86_64-Linux]~$>
Note that these directories (data and users) are linked to corresponding directories on the host, located at /mnt/kyon/Users/rudolph.pienaar/chris/ which you won't have access to ;).
There are two quick ways to amend this.
• create virtual drives from the data and users archives and mount them at these folders
or
• just increase the main disk drive and just plug in the data instead of the links (recommended)
Please note that if you are loading the existing ChRIS portable VDI into the MOC, even if you use a virtual machine with a large main drive, or resize the drive, you will need to increase the main disk partition manually after doing so (this was not available when we did this on the MOC, but is supposed to be coming soon in an update). You can use Gparted to do this fairly quickly (even while the VM is up and running)
To connect to ChRIS, from the host in a browser (preferably Chrome), connect to
http://localhost:8001
And the ChRIS front-end will be mounted at
http://your-external-ip-here/
Similarly, you can login as user chris with chris321 as the password.
This will bring up the ChRIS front-end.
Unfortunately, as ChRIS portable is configured to send jobs to a remote cluster, attempting to start jobs will just send them into the ether.
####Download and install FreeSurfer (for diagnostic purposes)
If you want to work on new plugins, and want to be able to verify that the output that you're getting from the Docker-ized version of Freesurfer works properly, you'll need to install FreeSurfer. You're going to want to get the Linux-CentOS 64bit version. Beware that this is a 4Gb download, and will expand to up to 8Gb. If you're working with the ChRIS portable image distributed by Children's Hospital, you will need to either expand the partition table manually, or you'll need to mount Freesurfer on a separate disk and link it into your filesystem.
Finally, you will need to configure the environment variables (thankfully, already done in the Docker-ized version):
export FREESURFER_HOME=<freesurfer_installation_directory>/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh
####Download chrismoc/freesurfer docker image Go ahead and install Docker. In order to make the symbolic links play nicely, we suggest that you install it into
/home/chris/DockerPlayground
as you can download the shell scripts directly from the repository here and the plugins won't require any tweaking.
Once you have docker installed (again, if using the portable version, beware of filesystem issues), you can get the image we used for the MOC by simply issuing:
docker pull chrismoc/freesurfer
As above, beware that this is a sizeable (8GB) download.
You will need to UPDATE the license by registering for FreeSurfer, as the license contained within is only intended for use within the MOC.
The simplest way to do this is to enter the image itself:
docker run -i -t --entrypoint /bin/bash chrismoc/freesurfer
cd /opt/freesurfer
Then replace the .license
file with the one which you were sent by MGH.
####Get the updated plugins.
The plugins from our repository on GitHub can be put directly into the ChRIS directory /src/chrisreloaded/plugins/
These plugins reference scripts located at /home/chris/DockerPlayground
- if you move them, you will need to change the file references in the plugins and in the scripts to the directory that you wish to use.