|
1 | 1 | #!/bin/bash
|
2 | 2 |
|
| 3 | +############################################################################### |
| 4 | +# Generate a Dockerfile for building a Mindboggle container (http://mindboggle.info). |
| 5 | +# The Dockerfile installs most of Mindboggle's dependencies, |
| 6 | +# including preprocessing software packages FreeSurfer and ANTs, |
| 7 | +# and visualization software roygbiv. |
| 8 | +# |
| 9 | +# Steps: |
| 10 | +# |
| 11 | +# Set up neurodebian and miniconda, and install conda packages. |
| 12 | +# Install FreeSurfer and ANTS. |
| 13 | +# Install Mindboggle templates from the Open Science Framework. |
| 14 | +# Install Mindboggle. |
| 15 | +# Install roygbiv for output visualization. |
| 16 | +# |
| 17 | +# Build the docker image: |
| 18 | +# docker build -t mindboggle -f Dockerfile.mindboggle.complete . |
| 19 | +# |
| 20 | +# Push to Docker hub: |
| 21 | +# (https://docs.docker.com/docker-cloud/builds/push-images/) |
| 22 | +# export DOCKER_ID_USER="nipy" |
| 23 | +# docker login |
| 24 | +# docker tag mindboggle nipy/mindboggle |
| 25 | +# docker push nipy/mindboggle |
| 26 | +# |
| 27 | +# Pull from Docker hub: |
| 28 | +# docker pull nipy/mindboggle |
| 29 | +# |
| 30 | +# In the following, the Docker container can be the original (mindboggle) |
| 31 | +# or the pulled version (nipy/mindboggle), and is given access to /Users/arno |
| 32 | +# on the host machine. |
| 33 | +# |
| 34 | +# Enter the bash shell of the Docker container, and add port mappings: |
| 35 | +# docker run --rm -ti -v /Users/arno:/home/jovyan/work -p 8888:8888 -p 5000:5000 nipy/mindboggle bash |
| 36 | +# |
| 37 | +# Run the Docker container as an executable (variables set for clarity): |
| 38 | +# HOST=/Users/binarybottle # path on host to access input and output |
| 39 | +# DOCK=/home/jovyan/work # path to HOST from Docker container |
| 40 | +# IMAGE=$DOCK/example_mri_data/T1.nii.gz # input image (from container) |
| 41 | +# ID=arno # ID for brain image |
| 42 | +# OUT=$DOCK/mindboggle123_output # '--output $OUT' is OPTIONAL |
| 43 | +# docker run --rm -ti -v $HOST:/home/jovyan/work nipy/mindboggle $IMAGE --id $ID --out $OUT |
| 44 | +############################################################################### |
| 45 | + |
3 | 46 | # Generate a dockerfile for building a mindboggle container
|
4 | 47 | docker run --rm kaczmarj/neurodocker:0.4.1 generate docker \
|
5 | 48 | --base neurodebian:stretch \
|
|
0 commit comments