pieper / SlicerMachines

Bootable machine images with Slicer and friends preloaded
Apache License 2.0
5 stars 1 forks source link

SlicerMachines

Bootable machine images with Slicer and friends preloaded

This is a work in progress.

Overall goal

Make it easy and quick to access a Slicer desktop environment with useful software pre-installed and ready to go.

The aws-image script creates a customized image that includes nvidia drivers, X windows, and Slicer ready to run with access via nvc.

The result is an AMI in AWS that can be used as the boot image for a VM instance.

gcp-image does the same thing for GCP.

Use cases

The goal of these scripts

Automate the process of configuring and publishing the disk image so that new versions of the OS, Slicer, and various extensions can be easily created and made avalailable.

Longer term goals

Earlier work

Supported by

Usage

Making an image

Keeping a log for debug

A command linke the following is suggested:

 ./scripts/gcp-image.sh 2>&1 | tee gcp-log-$(date +%s)

or

 ./scripts/aws-image.sh 2>&1 | tee gcp-log-$(date +%s)

Using an image

An example pulic AMI created with this script is: ami-09c0ee62c398960e7

Use it as the boot image for a machine like a g3.4xlarge (other g3 GPU machines should workas well). Machines take about a minute to boot. Be sure to request a public IP.

Once you have the machine running with a public IP you can run this to tunnel the vnc connection with whatever PEM you used and IP AWS provided. Tunnel port 6080 as in the following example:

ssh -i /Users/pieper/.ssh/condatest.pem ubuntu@54.167.32.251 -L 5432:localhost:6080

Then connect to localhost:5432 in your browser

Using an image from one GCP project to in a different billing project: see scripts/gcp-machine.sh

Troubleshooting

If the connection hangs you can try running sudo systemctl restart slicerX and sudo systemctl restart slicer

TODO

Installing MONAILabel

Example commands to experiment with MONAILabel.

sudo apt-get install python3-pip
python3 -m pip install --upgrade pip setuptools wheel
pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
pip3 install git+https://github.com/Project-MONAI/MONAILabel#egg=monailabel