innolitics / freesurfer

The official FreeSurfer repository maintained by LCN
Other
1 stars 2 forks source link

[ENH] create docker environment for testing python port #28

Closed ltirrell closed 6 years ago

ltirrell commented 6 years ago

This adds a dockerfile based on the dev setup listed here

I'm not sure your familiarity with Docker, but here are the commands to build and get a shell inside the environment.

Change into a local copy of the freesurfer repo, and checkout the correct branch, then run docker build:

cd /path/to/freesurfer
git checkout nf-gems2-python-port
docker build -t python-samseg .

Mount directories containing data to process and the SAMSEG_DATA_DIR (note that the mount path for the SAMSEG_DATA_DIR must be /data/samseg_data, but the other data can be mounted wherever you want)

docker run -it --rm \
           -v /path/to/samseg_data_dir:/data/samseg_data \
           -v /path/to/data:/data/temp_data \
           python-samseg bash

Inside the container, run this command to process subject 008:

python3 ./as_python/samseg/run_samseg_ported.py -o /data/temp_data/008 \
                                                -i /data/temp_data/008/mri/orig.mgz

(This is currently running now and seems to be working!)