nipy/mindboggle

[request] push latest image to dockerhub

mgxd opened this issue · 5 comments

mgxd commented

with updated nipype (1.1.1)

Will the pip install of nipype in environment.yml (circleci v1) make use of nipype 1.1.1?

satra commented

Will the pip install of nipype in environment.yml (circleci v1) make use of nipype 1.1.1?

it will install whatever the latest release is, since version is not explicitly provided. also, once PR #156 is merged we should be able to use the Dockerfile to automatically create releases on docker hub.

Great, thank you! I like to include as much documentation as possible. The Docker.mindboggle.[base, complete] files included the following instructions -- what portion shall I retain for a new file install/README?:

Dockerfile.mindboggle.base

This Dockerfile installs most of Mindboggle's dependencies,
including preprocessing software packages FreeSurfer and ANTs,
and visualization software roygbiv.

-- Adapted from dockerfiles created by Satrajit Ghosh satra@mit.edu
for a nipype workshop held at MIT in March 2017
(in turn adapted from https://github.com/miykael/nipype_env)

Steps:

  1. Update OS dependencies and set up neurodebian.
  2. Install conda packages and nibabel.
  3. Install FreeSurfer.
  4. Install ANTS.
  5. Install dependencies for mindboggle's C++ library.
  6. Install mindboggle's OASIS-30_Atropos_template data for use by ANTs.
    Missing steps (see Dockerfile.mindboggle.complete):
  7. Install mindboggle.
  8. Install roygbiv for mindboggle output visualization.

Dockerfile.mindboggle.complete

This Dockerfile installs mindboggle (http://mindboggle.info)
and visualization software roygbiv. This builds on the docker image
nipy/mindboggle-base, which contains all of Mindboggle's dependencies
and preprocessing software packages, including FreeSurfer and ANTs.

Steps:

  1. Install mindboggle.
  2. Install roygbiv for mindboggle output visualization.

Build the docker image:
docker build -t mindboggle -f Dockerfile.mindboggle.complete .

Push to Docker hub:
(https://docs.docker.com/docker-cloud/builds/push-images/)
export DOCKER_ID_USER="nipy"
docker login
docker tag mindboggle nipy/mindboggle
docker push nipy/mindboggle

Pull from Docker hub:
docker pull nipy/mindboggle

In the following, the Docker container can be the original (mindboggle)
or the pulled version (nipy/mindboggle), and is given access to /Users/arno
on the host machine.

Enter the bash shell of the Docker container, and add port mappings:
docker run --rm -ti -v /Users/arno:/home/jovyan/work -p 8888:8888 -p 5000:5000 nipy/mindboggle bash

Run the Docker container as an executable (variables set for clarity):
HOST=/Users/binarybottle # path on host to access input and output
DOCK=/home/jovyan/work # path to HOST from Docker container
IMAGE=$DOCK/example_mri_data/T1.nii.gz # input image (from container)
ID=arno # ID for brain image
OUT=$DOCK/mindboggle123_output # '--output $OUT' is OPTIONAL
docker run --rm -ti -v $HOST:/home/jovyan/work nipy/mindboggle $IMAGE --id $ID --out $OUT

satra commented

@binarybottle - now that the dockerfile is being generated by the neurodocker.sh script, perhaps instructions can go there. the shell script itself should be quite straightforward to follow.