Created
May 15, 2020 17:39
-
-
Save clin045/d49f102b24d0e8911a92a6912791d8bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jupyter/scipy-notebook | |
USER root | |
# add os packages | |
RUN apt-get -y update && apt-get install -y --no-install-recommends\ | |
apt-utils \ | |
bash-completion \ | |
curl \ | |
gnupg \ | |
nodejs \ | |
npm \ | |
python-pip \ | |
wget \ | |
xorg && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean && \ | |
fix-permissions $CONDA_DIR && \ | |
fix-permissions /home/$NB_USER | |
# add neurodebian repo | |
RUN curl -sSL http://neuro.debian.net/lists/bionic.us-nh.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \ | |
apt-key adv \ | |
--recv-keys \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 0xA5D32F012649A5A9 | |
# --keyserver-options http-proxy=http://proxy.tch.harvard.edu:3128 0xA5D32F012649A5A9 | |
# add neuroimaging software | |
RUN apt-get update && apt-get install -y --no-install-recommends\ | |
fsl-complete \ | |
neurodebian-archive-keyring \ | |
octave \ | |
octave-pkg-dev \ | |
octave-image \ | |
software-properties-common && \ | |
apt-get remove -y software-properties-common && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean | |
RUN git clone https://github.com/andersonwinkler/PALM.git /opt/software/palm/ && \ | |
cd /opt/software/palm/fileio/@file_array/private && \ | |
./compile.sh | |
# Install MATLAB MCR | |
ENV MATLAB_VERSION R2017b | |
RUN mkdir /opt/mcr_install && \ | |
mkdir /opt/mcr && \ | |
wget --quiet -P /opt/mcr_install http://www.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/deployment_files/${MATLAB_VERSION}/installers/glnxa64/MCR_${MATLAB_VERSION}_glnxa64_installer.zip && \ | |
unzip -q /opt/mcr_install/MCR_${MATLAB_VERSION}_glnxa64_installer.zip -d /opt/mcr_install && \ | |
/opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \ | |
rm -rf /opt/mcr_install | |
# Configure MCR environment | |
ENV MCR_VERSION v93 | |
ENV LD_LIBRARY_PATH /opt/mcr/${MCR_VERSION}/runtime/glnxa64:/opt/mcr/${MCR_VERSION}/bin/glnxa64:/opt/mcr/${MCR_VERSION}/sys/os/glnxa64:/opt/mcr/${MCR_VERSION}/sys/opengl/lib/glnxa64 | |
ENV MCR_INHIBIT_CTF_LOCK 1 | |
ENV MCRPath /opt/mcr/${MCR_VERSION} | |
# Set FSL environment variables | |
ENV FSLDIR /usr/share/fsl/5.0 / | |
ENV PALMDIR /opt/software/palm/ | |
ENV FSLOUTPUTTYPE NIFTI_GZ | |
ENV PATH $PALMDIR:/usr/lib/fsl/5.0:$PATH | |
ENV FSLMULTIFILEQUIT TRUE | |
ENV LD_LIBRARY_PATH /usr/lib/fsl/5.0:$LD_LIBRARY_PATH | |
ENV FSLTCLSH /usr/bin/tclsh | |
ENV FSLWISH /usr/bin/wish | |
ENV XDG_RUNTIME_DIR "" | |
# Switch back to jovyan to avoid accidental container runs as root | |
USER $NB_USER | |
# Add to python environment | |
RUN pip install --no-cache-dir \ | |
hdf5storage \ | |
natsort \ | |
nilearn \ | |
pyxnat \ | |
termcolor \ | |
tqdm \ | |
papermill \ | |
&& python -m ipykernel install --user | |
FROM jupyter/scipy-notebook | |
USER root | |
# add os packages | |
RUN apt-get -y update && apt-get install -y --no-install-recommends\ | |
apt-utils \ | |
bash-completion \ | |
curl \ | |
gnupg \ | |
nodejs \ | |
npm \ | |
python-pip \ | |
wget \ | |
xorg && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean && \ | |
fix-permissions $CONDA_DIR && \ | |
fix-permissions /home/$NB_USER | |
# add neurodebian repo | |
RUN curl -sSL http://neuro.debian.net/lists/bionic.us-nh.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \ | |
apt-key adv \ | |
--recv-keys \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 0xA5D32F012649A5A9 | |
# --keyserver-options http-proxy=http://proxy.tch.harvard.edu:3128 0xA5D32F012649A5A9 | |
# add neuroimaging software | |
RUN apt-get update && apt-get install -y --no-install-recommends\ | |
fsl-complete \ | |
neurodebian-archive-keyring \ | |
octave \ | |
octave-pkg-dev \ | |
octave-image \ | |
software-properties-common && \ | |
apt-get remove -y software-properties-common && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
apt-get clean | |
RUN git clone https://github.com/andersonwinkler/PALM.git /opt/software/palm/ && \ | |
cd /opt/software/palm/fileio/@file_array/private && \ | |
./compile.sh | |
# Install MATLAB MCR | |
ENV MATLAB_VERSION R2017b | |
RUN mkdir /opt/mcr_install && \ | |
mkdir /opt/mcr && \ | |
wget --quiet -P /opt/mcr_install http://www.mathworks.com/supportfiles/downloads/${MATLAB_VERSION}/deployment_files/${MATLAB_VERSION}/installers/glnxa64/MCR_${MATLAB_VERSION}_glnxa64_installer.zip && \ | |
unzip -q /opt/mcr_install/MCR_${MATLAB_VERSION}_glnxa64_installer.zip -d /opt/mcr_install && \ | |
/opt/mcr_install/install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \ | |
rm -rf /opt/mcr_install | |
# Configure MCR environment | |
ENV MCR_VERSION v93 | |
ENV LD_LIBRARY_PATH /opt/mcr/${MCR_VERSION}/runtime/glnxa64:/opt/mcr/${MCR_VERSION}/bin/glnxa64:/opt/mcr/${MCR_VERSION}/sys/os/glnxa64:/opt/mcr/${MCR_VERSION}/sys/opengl/lib/glnxa64 | |
ENV MCR_INHIBIT_CTF_LOCK 1 | |
ENV MCRPath /opt/mcr/${MCR_VERSION} | |
# Set FSL environment variables | |
ENV FSLDIR /usr/share/fsl/5.0 / | |
ENV PALMDIR /opt/software/palm/ | |
ENV FSLOUTPUTTYPE NIFTI_GZ | |
ENV PATH $PALMDIR:/usr/lib/fsl/5.0:$PATH | |
ENV FSLMULTIFILEQUIT TRUE | |
ENV LD_LIBRARY_PATH /usr/lib/fsl/5.0:$LD_LIBRARY_PATH | |
ENV FSLTCLSH /usr/bin/tclsh | |
ENV FSLWISH /usr/bin/wish | |
ENV XDG_RUNTIME_DIR "" | |
# Switch back to jovyan to avoid accidental container runs as root | |
USER $NB_USER | |
# Add to python environment | |
RUN pip install --no-cache-dir \ | |
hdf5storage \ | |
natsort \ | |
nilearn \ | |
pyxnat \ | |
termcolor \ | |
tqdm \ | |
papermill \ | |
&& python -m ipykernel install --user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment