Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 94 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,102 @@
# This Dockerfile is based on 'miykael/nipype_env', for more information see:
# https://hub.docker.com/r/miykael/nipype_env/
# This Dockerfile is based on the dockerfiles 'crn_base' and 'crn_nipype' from
# the Poldrack Lab (https://github.com/poldracklab/crn_base), the dockerfiles
# from neurovault (https://github.com/NeuroVault/NeuroVault) and the dockerfile
# biss2016-notebook from Oscar Esteban under https://hub.docker.com/u/oesteban.
#
# This means that the same copyrights apply to this Dockerfile, as they do for
# the above mentioned dockerfiles. For more information see:
# https://github.com/miykael/nipype_env

FROM miykael/nipype_env
MAINTAINER Michael Notter <michaelnotter@hotmail.com>

# Switch to root user
# Switch to root user for installation
USER root

# Create main user and home folder
RUN useradd -ms /bin/bash main
USER main
WORKDIR /home/main
# Preparations
RUN ln -snf /bin/bash /bin/sh
ARG DEBIAN_FRONTEND=noninteractive

#RUN find $HOME/notebooks -name '*.ipynb' -exec ipython trust {} \;
# Update packages and install the minimal set of tools
RUN apt-get update && \
apt-get install -y curl \
git \
xvfb \
bzip2 \
unzip \
apt-utils \
gfortran \
fusefat \
liblapack-dev \
libblas-dev \
libatlas-dev \
libatlas-base-dev \
libblas3 \
libblas-common \
libopenblas-dev \
libxml2-dev \
libxslt1-dev \
libfreetype6-dev \
libpng12-dev \
libqhull-dev \
libxft-dev \
libjpeg-dev \
libyaml-dev -qq

# Enable neurodebian
RUN curl -sSL http://neuro.debian.net/lists/jessie.de-md.full | tee /etc/apt/sources.list.d/neurodebian.sources.list && \
curl -sSL http://neuro.debian.net/lists/jessie.us-tn.full >> /etc/apt/sources.list.d/neurodebian.sources.list
RUN apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9
RUN apt-get update -qq
RUN apt-get install -y fsl afni -qq

# Set-up environment
RUN echo '#!/bin/bash' > /etc/profile.d/neuro_env.sh && \
echo 'FSLDIR=/usr/share/fsl' >> /etc/profile.d/neuro_env.sh && \
echo 'source /etc/fsl/fsl.sh' >> /etc/profile.d/neuro_env.sh && \
echo 'PATH=$FSLDIR/5.0/bin:$PATH' >> /etc/profile.d/neuro_env.sh && \
echo 'export FSLDIR PATH' >> /etc/profile.d/neuro_env.sh && \
echo 'export PATH=/usr/lib/afni/bin:$PATH' >> /etc/profile.d/neuro_env.sh && \
echo 'source /etc/profile.d/neuro_env.sh' >> /etc/bash.bashrc
#RUN source activate neuro_env

# Update conda and install relevant dependencies
RUN conda update conda --yes --quiet
RUN conda update anaconda --yes --quiet
RUN conda install --yes --quiet cython \
h5py \
ipython \
jupyter \
matplotlib \
networkx \
nose \
numpy \
pandas \
scikit-image \
scikit-learn \
scipy \
seaborn
RUN python -c "from matplotlib import font_manager"
RUN conda clean -a

# Install dependencies in pip
RUN pip install --upgrade pip && \
pip install --upgrade dipy \
graphviz \
nibabel \
nipy \
pydotplus \
rdflib \
xvfbwrapper \
--ignore-installed

# Install nipype
RUN pip install -e git+https://github.com/nipy/nipype#egg=nipype

# Clear apt cache and other empty folders
RUN apt-get clean remove -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
rm -rf /boot /media /mnt /opt /srv

ENV SHELL /bin/bash

CMD ["/bin/bash"]
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Nipype Tutorial Notebooks

The Nipype tutorial notebooks run on [mybinder.org](http://mybinder.org/) and can be started by clicking on the following button: [![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/miykael/nipype_notebooks)
The Nipype tutorial runs on [mybinder.org](http://mybinder.org/) and can be started by clicking on the following button: [![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/miykael/nipype_tutorial)

The Dockerfile that creates the nipype environment on mybinder is based on the docker image [miykael/nipype_basic](https://hub.docker.com/r/miykael/nipype_basic/).


## The Dataset

The data used for this tutorial is from [openfmri.org](https://openfmri.org/) and is structured according the new and fancy [Brain Imaging Data Structure (BIDS)](http://bids.neuroimaging.io/).

The dataset ds005 used for this tutorial was shortened to only two subjects, *sub-15* and *sub-16* and restricted to the first two functional runs. For more information about the dataset, see the [description on openfmri.org](https://openfmri.org/dataset/ds000105/).


## Feedback, Help & Support

If you want to help us with this tutorial or have any questions, fell free to fork our repo [github.com/miykael/nipype_tutorial](https://github.com/miykael/nipype_tutorial) or interact with other contributors on the slack channel [brainhack.slack.com/messages/nipype/](https://brainhack.slack.com/messages/nipype/)
5 changes: 5 additions & 0 deletions example_nb/mwaskom/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.PHONY: clean

clean:
@-rm -rf *.nii* data/T1*_*.nii* data/timeseries_*.nii.* data/*.nii\
crash-* *.dot* working_dir/ smoothflow/ susanflow/
27 changes: 27 additions & 0 deletions example_nb/mwaskom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Nipype Concepts
===============

This collection of [IPython](http://ipython.org/)
notebooks should provide an introduction to some of the
main concepts central to using [Nipype](http://nipy.sourceforge.net/nipype/)
for neuroimaging analysis.

Static HTML Links
-----------------

- [Interfaces](http://nbviewer.ipython.org/urls/raw.github.com/mwaskom/nipype_concepts/master/interfaces.ipynb)
- [Workflows](http://nbviewer.ipython.org/urls/raw.github.com/mwaskom/nipype_concepts/master/workflows.ipynb)
- [Iteration](http://nbviewer.ipython.org/urls/raw.github.com/mwaskom/nipype_concepts/master/iteration.ipynb)

Requirements
------------

- [IPython](http://ipython.org/)
- [Nipype](http://nipy.sourceforge.net/nipype/)
- [FSL](http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/)
- [SPM](http://www.fil.ion.ucl.ac.uk/spm/) (Optional)

License
-------

Simplified BSD
Binary file added example_nb/mwaskom/data/T1-a.nii.gz
Binary file not shown.
Binary file added example_nb/mwaskom/data/T1-b.nii.gz
Binary file not shown.
Binary file added example_nb/mwaskom/data/T1.nii.gz
Binary file not shown.
Binary file added example_nb/mwaskom/data/timeseries.nii.gz
Binary file not shown.
1,052 changes: 1,052 additions & 0 deletions example_nb/mwaskom/interfaces.ipynb

Large diffs are not rendered by default.

Loading