anchor.diff:  ENV PYENV_NAME pytre
   
   ## Configure default locale
  -RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
  -    && locale-gen en_US.utf8 \
  -    && /usr/sbin/update-locale LANG=en_US.UTF-8
  +RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
  +    locale-gen en_US.utf8 && \
  +    /usr/sbin/update-locale LANG=en_US.UTF-8
   
   ENV LC_ALL en_US.UTF-8
   ENV LANG en_US.UTF-8
   
   
  -# Install.
  -RUN \
  -  sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  -  apt-get update && \
  -  apt-get -y upgrade && \
  -  apt-get install -y build-essential && \
  -  apt-get install -y software-properties-common && \
  -  apt-get install -y byobu \
  -                     ssh \
  -                     curl \
  -                     git \
  -                     htop \
  -                     man \
  -                     unzip \
  -                     vim \
  -                     wget \
  -                     xvfb \
  -                     bzip2 \
  -                     unzip \
  -                     apt-utils \
  -                     fusefat \
  -                     graphviz
  +# neurodebian and Install.
  +RUN \
  +    wget -O- $NEURODEBIAN_URL | tee /etc/apt/sources.list.d/neurodebian.sources.list && \
  +    apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 0xA5D32F012649A5A9 && \
  +    sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
  +    apt-get update && \
  +    apt-get -y upgrade && \
  +    apt-get install -y build-essential && \
  +    apt-get install -y software-properties-common && \
  +    apt-get install -y \
  +byobu \
  +ssh \
  +curl \
  +git \
  +htop \
  +unzip \
  +vim \
  +wget \
  +xvfb \
  +bzip2 \
  +unzip \
  +apt-utils \
  +fusefat \
  +graphviz \
  +cmake \
  +gcc-4.9 \
  +g++-4.9 \
  +gfortran-4.9 \
  +tcsh \
  +xfonts-base \
  +python-qt4 \
  +libxm4 \
  +libuil4 \
  +libmrm4 \
  +libmotif-common \
  +libmotif-dev \
  +motif-clients \
  +gsl-bin \
  +netpbm \
  +gnome-tweak-tool \
  +libjpeg62 \
  +libxml2-dev \
  +libxslt1-dev \
  +mricron \
  +dicomnifti \
  +fsl-core \
  +fsl-atlases \
  +fsl-5.0-eddy-nonfree \
  +python3-dev \
  +python3-pip \
  +python3-virtualenv \
  +python3-tk && \
  +    ln -s /usr/lib/x86_64-linux-gnu/libgsl.so /usr/lib/libgsl.so.0
  +    apt-get -y build-dep vtk6 && \
  +    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5   40 --slave /usr/bin/g++ g++ /usr/bin/g++-5 && \
  +    update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 && \
  +    rm -rf /var/lib/apt/lists/*
   
   EXPOSE 22
   
  
positive.code:           -DUSE_SYSTEM_VTK=ON \
            -DVTK_DIR=$SOFT/vtk/build \
            ../ANTs && \
      make -j $N_CPUS
  
  RUN \
      echo "export ANTSPATH=${SOFT}/ants/build/bin" >> $BASHRC && \
      echo 'addpath $ANTSPATH' >> $BASHRC
  
  
negative.code:          -o matlab_installer/installer.zip && \
      unzip matlab_installer/installer.zip -d matlab_installer/ && \
      matlab_installer/install -inputFile mcr_options.txt && \
      rm -rf matlab_installer mcr_options.txt && \
      echo "export MCR_DIR=$SOFT/mcr/v85" >> $BASHRC && \
      echo "addpath $MCR_DIR/bin"         >> $BASHRC && \
      cd $SOFT && \
      curl -sSL http://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/dev/spm12_r6472_Linux_R2015a.zip \
           -o spm12.zip && \
      unzip spm12.zip && \
      rm -rf spm12.zip && \
      echo "export SPM_DIR=$SOFT/spm12"                               >> $BASHRC && \
      echo "export SPMMCRCMD='$SPM_DIR/run_spm12.sh $MCR_DIR script'" >> $BASHRC && \
      echo "export FORCE_SPMMCR=1"                                    >> $BASHRC
  
  ENV MCR_DIR $SOFT/mcr/v85
  ENV SPM_DIR $SOFT/spm12
  ENV SPMMCRCMD "$SPM_DIR/run_spm12.sh $MCR_DIR script"
  ENV FORCE_SPMMCR 1
  
  #-------------------------------------------------------------------------------
  # Python environment with virtualenvwrapper
  #-------------------------------------------------------------------------------
  RUN \
      pip3 install -U pip setuptools virtualenvwrapper && \
      export VIRTUALENVWRAPPER_PYTHON=`which python3` && \
      export WORKON_HOME=$HOME/pyenvs && \
      source /usr/local/bin/virtualenvwrapper.sh && \
      mkvirtualenv -p /usr/bin/python3 $PYENV_NAME && \
      source $WORKON_HOME/$PYENV_NAME/bin/activate && \
      pip install cython && \
      pip install numpy scipy && \
      pip install -r $HOME/pypes_requirements.txt && \
      echo "export VIRTUALENVWRAPPER_PYTHON=`which python3`" >> $BASHRC && \
      echo "export WORKON_HOME=$HOME/pyenvs"                 >> $BASHRC && \
      echo "source /usr/local/bin/virtualenvwrapper.sh"      >> $BASHRC && \
      echo "workon $PYENV_NAME"                              >> $BASHRC
  
  #-------------------------------------------------------------------------------
  # source .bashrc
  #-------------------------------------------------------------------------------
  RUN source $BASHRC && \
      ldconfig
  
  CMD ["/bin/bash"]
  