anchor.diff:      && conda config --system --prepend channels conda-forge \
       && conda config --system --set auto_update_conda false \
       && conda config --system --set show_channel_urls true \
  -    && conda update -y -q --all && sync \
       && conda clean -tipsy && sync
   
   #-------------------------
   # Create conda environment
   #-------------------------
  -RUN conda create -y -q --name neuro3 \
  -    	python=3.6 altair apptools bokeh codecov configobj cython joblib jupyter jupyter_contrib_nbextensions jupyterhub jupyterlab matplotlib nitime pandas reprounzip reprozip scikit-image scikit-learn seaborn swig traits traitsui \
  +RUN conda create -y -q --name neuro python=3.6 \
  +                                    jupyter \
  +                                    jupyterlab \
  +                                    jupyter_contrib_nbextensions \
  +                                    traits \
  +                                    pandas \
  +                                    matplotlib \
  +                                    scikit-learn \
  +                                    seaborn \
  +                                    swig \
  +                                    reprozip \
  +                                    reprounzip \
       && sync && conda clean -tipsy && sync \
  -    && /bin/bash -c "source activate neuro3 \
  -    	&& pip install -q --no-cache-dir \
  -    	https://github.com/nipy/nipype/tarball/master https://github.com/nipy/nibabel/archive/master.zip https://github.com/INCF/pybids/archive/master.zip git+https://github.com/jupyterhub/nbserverproxy.git git+https://github.com/jupyterhub/nbrsessionproxy.git https://github.com/satra/mapalign/archive/master.zip datalad dipy duecredit nilearn nipy niworkflows pprocess pymvpa2" \
  -    && sync
  -ENV PATH=/opt/conda/envs/neuro3/bin:$PATH
  +    && /bin/bash -c "source activate neuro \
  +      && pip install -q --no-cache-dir https://github.com/nipy/nipype/tarball/master \
  +                                       https://github.com/INCF/pybids/tarball/master \
  +                                       nilearn \
  +                                       datalad[full] \
  +                                       dipy \
  +                                       nipy \
  +                                       duecredit \
  +                                       pymvpa2" \
  +    && sync \
  +    && sed -i '$isource activate neuro' $ND_ENTRYPOINT
  +
  +# User-defined BASH instruction
  +RUN bash -c "source activate neuro && jupyter nbextension enable exercise2/main && jupyter nbextension enable spellchecker/main"
   
   # User-defined instruction
  -RUN bash -c "source activate neuro3 && python -m ipykernel install --sys-prefix --name neuro3 --display-name Py3-neuro" 
  +RUN mkdir -p ~/.jupyter && echo c.NotebookApp.ip = \"0.0.0.0\" > ~/.jupyter/jupyter_notebook_config.py
  +
  +COPY [".", "/home/neuro/"]
  +
  +USER root
   
   # User-defined instruction
  -RUN bash -c "source activate neuro3 && pip install --no-cache-dir --pre --upgrade ipywidgets pythreejs" 
  +RUN chown -R neuro /home/neuro
   
   # User-defined instruction
  -RUN bash -c "source activate neuro3 && pip install --no-cache-dir --upgrade https://github.com/maartenbreddels/ipyvolume/archive/master.zip && jupyter nbextension install --py --sys-prefix ipyvolume && jupyter nbextension enable --py --sys-prefix ipyvolume" 
  +RUN mkdir /data && chmod 777 /data && chmod a+s /data
   
   # User-defined instruction
  -RUN bash -c "source activate neuro3 && pip install --no-cache-dir git+https://github.com/data-8/gitautosync && jupyter serverextension enable --py nbgitautosync --sys-prefix" 
  -
  -# User-defined instruction
  -RUN bash -c "source activate neuro3 && jupyter nbextension enable rubberband/main && jupyter nbextension enable exercise2/main && jupyter nbextension enable spellchecker/main && jupyter nbextension enable vega --py --sys-prefix" 
  -
  -# User-defined instruction
  -RUN bash -c "source activate neuro3 && jupyter serverextension enable --sys-prefix --py nbserverproxy && jupyter serverextension enable --sys-prefix --py nbrsessionproxy && jupyter nbextension install --sys-prefix --py nbrsessionproxy && jupyter nbextension enable --sys-prefix --py nbrsessionproxy" 
  -
  -USER root
  -
  -# User-defined instruction
  -RUN echo 'neuro:neuro' | chpasswd && usermod -aG sudo neuro
  -
  -# User-defined instruction
  -RUN mkdir /data && chown neuro /data && chmod 777 /data && mkdir /output && chown neuro /output && chmod 777 /output && mkdir /repos && chown neuro /repos && chmod 777 /repos
  +RUN mkdir /output && chmod 777 /output && chmod a+s /output
   
   USER neuro
   
  -# User-defined instruction
  -RUN cd /repos && git clone https://github.com/neuro-data-science/neuroviz.git && git clone https://github.com/neuro-data-science/neuroML.git && git clone https://github.com/ReproNim/reproducible-imaging.git && git clone https://github.com/miykael/nipype_tutorial.git && git clone https://github.com/jmumford/nhwEfficiency.git && git clone https://github.com/jmumford/R-tutorial.git
  -
  -# User-defined instruction
  -RUN bash -c "source activate neuro3 && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && datalad --on-failure ignore get -r -J4 ds000114/sub-01/ses-test/anat && datalad --on-failure ignore get -r -J4 ds000114/sub-01/ses-test/func/*fingerfootlips* && datalad --on-failure ignore get -r -J4 ds000114/derivatives/fmriprep/sub-01/anat && datalad --on-failure ignore get -r -J4 ds000114/derivatives/fmriprep/sub-01/ses-test/func/*fingerfootlips*" 
  -
  -# User-defined instruction
  -RUN curl -sSL https://osf.io/dhzv7/download?version=3 | tar zx -C /data/ds000114/derivatives/fmriprep
  -
  -# User-defined instruction
  -ENV LD_LIBRARY_PATH="/usr/lib/R/lib:${LD_LIBRARY_PATH}" 
  -
  -# User-defined instruction
  -RUN bash -c "echo c.NotebookApp.ip = \'0.0.0.0\' > ~/.jupyter/jupyter_notebook_config.py" 
  -
  -WORKDIR /repos
  +# User-defined BASH instruction
  +RUN bash -c "source activate neuro && cd	/data && datalad install -r ///workshops/nih-2017/ds000114 \
  +    && cd /data/ds000114 && datalad get sub-*/ses-test/anat && datalad get sub-*/ses-test/func/*fingerfootlips* && datalad get derivatives/fmriprep/sub-*/anat && datalad get derivatives/fmriprep/sub-*/ses-test/func/*fingerfootlips*"
  +
  +WORKDIR /home/neuro
  +
  +CMD ["jupyter-notebook"]
   
   #--------------------------------------
   # Save container specifications to JSON
  
positive.code:     \n      } \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN curl -sSL https://dl.dropbox.com/s/lfuppfhuhi1li9t/cifti-data.tgz?dl=0 | tar zx -C / " \
      \n    ], \
      \n    [ \
      \n      "user", \
      \n      "neuro" \
      \n    ], \
      \n    [ \
      \n      "miniconda", \
      \n      { \
      \n        "conda_install": "python=3.6 altair apptools bokeh codecov configobj cython joblib jupyter jupyter_contrib_nbextensions jupyterhub jupyterlab matplotlib nitime pandas reprounzip reprozip scikit-image scikit-learn seaborn swig traits traitsui", \
      \n        "env_name": "neuro3", \
      \n        "add_to_path": true, \
      \n        "pip_install": "https://github.com/nipy/nipype/tarball/master https://github.com/nipy/nibabel/archive/master.zip https://github.com/INCF/pybids/archive/master.zip git+https://github.com/jupyterhub/nbserverproxy.git git+https://github.com/jupyterhub/nbrsessionproxy.git https://github.com/satra/mapalign/archive/master.zip datalad dipy duecredit nilearn nipy niworkflows pprocess pymvpa2" \
      \n      } \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && python -m ipykernel install --sys-prefix --name neuro3 --display-name Py3-neuro\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && pip install --no-cache-dir --pre --upgrade ipywidgets pythreejs\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && pip install --no-cache-dir --upgrade https://github.com/maartenbreddels/ipyvolume/archive/master.zip && jupyter nbextension install --py --sys-prefix ipyvolume && jupyter nbextension enable --py --sys-prefix ipyvolume\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && pip install --no-cache-dir git+https://github.com/data-8/gitautosync && jupyter serverextension enable --py nbgitautosync --sys-prefix\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && jupyter nbextension enable rubberband/main && jupyter nbextension enable exercise2/main && jupyter nbextension enable spellchecker/main && jupyter nbextension enable vega --py --sys-prefix\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && jupyter serverextension enable --sys-prefix --py nbserverproxy && jupyter serverextension enable --sys-prefix --py nbrsessionproxy && jupyter nbextension install --sys-prefix --py nbrsessionproxy && jupyter nbextension enable --sys-prefix --py nbrsessionproxy\" " \
      \n    ], \
      \n    [ \
      \n      "user", \
      \n      "root" \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN echo 'neuro:neuro' | chpasswd && usermod -aG sudo neuro" \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN mkdir /data && chown neuro /data && chmod 777 /data && mkdir /output && chown neuro /output && chmod 777 /output && mkdir /repos && chown neuro /repos && chmod 777 /repos" \
      \n    ], \
      \n    [ \
      \n      "user", \
      \n      "neuro" \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN cd /repos && git clone https://github.com/neuro-data-science/neuroviz.git && git clone https://github.com/neuro-data-science/neuroML.git && git clone https://github.com/ReproNim/reproducible-imaging.git && git clone https://github.com/miykael/nipype_tutorial.git && git clone https://github.com/jmumford/nhwEfficiency.git && git clone https://github.com/jmumford/R-tutorial.git" \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"source activate neuro3 && cd /data && datalad install -r ///workshops/nih-2017/ds000114 && datalad --on-failure ignore get -r -J4 ds000114/sub-01/ses-test/anat && datalad --on-failure ignore get -r -J4 ds000114/sub-01/ses-test/func/*fingerfootlips* && datalad --on-failure ignore get -r -J4 ds000114/derivatives/fmriprep/sub-01/anat && datalad --on-failure ignore get -r -J4 ds000114/derivatives/fmriprep/sub-01/ses-test/func/*fingerfootlips*\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN curl -sSL https://osf.io/dhzv7/download?version=3 | tar zx -C /data/ds000114/derivatives/fmriprep" \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "ENV LD_LIBRARY_PATH=\"/usr/lib/R/lib:${LD_LIBRARY_PATH}\" " \
      \n    ], \
      \n    [ \
      \n      "instruction", \
      \n      "RUN bash -c \"echo c.NotebookApp.ip = \\'0.0.0.0\\' > ~/.jupyter/jupyter_notebook_config.py\" " \
      \n    ], \
      \n    [ \
      \n      "workdir", \
      \n      "/repos" \
      \n    ] \
      \n  ], \
      \n  "generation_timestamp": "2017-09-06 14:26:38", \
      \n  "neurodocker_version": "0.2.0-30-g4b9bd64" \
      \n}' > /neurodocker/neurodocker_specs.json
  
  
negative.code:     LC_ALL="C.UTF-8" \
      ND_ENTRYPOINT="/neurodocker/startup.sh"
  RUN apt-get update -qq && apt-get install -yq --no-install-recommends  \
      	apt-utils bzip2 ca-certificates curl locales unzip \
      && apt-get clean \
      && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
      && localedef --force --inputfile=en_US --charmap=UTF-8 C.UTF-8 \
  