chrisvriend/ENIGMA_subthal:s3cw256
$ singularity pull shub://chrisvriend/ENIGMA_subthal:s3cw256
Singularity Recipe
# Your version: 0.6.0 Latest version: 0.6.0
# Generated by Neurodocker version 0.6.0
# Timestamp: 2020-03-03 09:25:37 UTC
#
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
#
# https://github.com/kaczmarj/neurodocker
Bootstrap: docker
From: debian:stretch
%post
export ND_ENTRYPOINT="/neurodocker/mainscript.sh"
apt-get update -qq
apt-get install -y -q --no-install-recommends \
apt-utils \
bzip2 \
ca-certificates \
curl \
locales \
time \
unzip \
procps
apt-get clean
rm -rf /var/lib/apt/lists/*
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen
dpkg-reconfigure --frontend=noninteractive locales
update-locale LANG="en_US.UTF-8"
chmod 777 /opt && chmod a+s /opt
mkdir -p /neurodocker
if [ ! -f "$ND_ENTRYPOINT" ]; then
echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT"
echo 'set -e' >> "$ND_ENTRYPOINT"
echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT"
echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT";
fi
chmod -R 777 /neurodocker && chmod a+s /neurodocker
# download Python
export PATH="/opt/miniconda-latest/bin:$PATH"
echo "Downloading Miniconda installer ..."
conda_installer="/tmp/miniconda.sh"
curl -fsSL --retry 5 -o "$conda_installer" https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh
bash "$conda_installer" -b -p /opt/miniconda-latest
rm -f "$conda_installer"
conda update -y -q -nbase conda
conda config --system --prepend channels conda-forge
conda config --system --set auto_update_conda false
conda config --system --set show_channel_urls true
sync && conda clean -y --all && sync
conda create -y -q --name neuro
conda install -y -q --name neuro \
"python=3.7" \
"traits" \
"numpy" \
"pandas" \
"seaborn=0.10.1" \
"matplotlib"
sync && conda clean -y --all && sync
bash -c "source activate neuro
pip install --no-cache-dir \
"ptitprince" \
"nilearn" \
"plotly""
rm -rf ~/.cache/pip/*
sync
apt-get update -qq
apt-get install -y -q --no-install-recommends \
bc \
libgomp1 \
libxmu6 \
libxt6 \
perl \
tcsh
apt-get clean
rm -rf /var/lib/apt/lists/*
echo "Downloading FreeSurfer ..."
mkdir -p /opt/freesurfer7
chmod -R 777 /opt/freesurfer7 && chmod a+s /opt/freesurfer7
curl -fsSL --retry 5 https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/7.1.1/freesurfer-linux-centos6_x86_64-7.1.1.tar.gz \
| tar -xz -C /opt/freesurfer7 --strip-components 1 \
--exclude='freesurfer/average/mult-comp-cor' \
--exclude='freesurfer/average/BrainstemSS' \
--exclude='freesurfer/average/Buckner_JNeurophysiol11_MNI152' \
--exclude='freesurfer/average/Choi_JNeurophysiol12_MNI152' \
--exclude='freesurfer/average/HippoSF' \
--exclude='freesurfer/average/Yeo_Brainmap_MNI152' \
--exclude='freesurfer/average/Yeo_JNeurophysiol11_MNI152' \
--exclude='freesurfer/lib/cuda' \
--exclude='freesurfer/lib/qt' \
--exclude='freesurfer/subjects/V1_average' \
--exclude='freesurfer/subjects/bert' \
--exclude='freesurfer/subjects/cvs_avg35' \
--exclude='freesurfer/subjects/cvs_avg35_inMNI152' \
--exclude='freesurfer/subjects/fsaverage3' \
--exclude='freesurfer/subjects/fsaverage4' \
--exclude='freesurfer/subjects/fsaverage5' \
--exclude='freesurfer/subjects/fsaverage6' \
--exclude='freesurfer/subjects/fsaverage_sym' \
--exclude='freesurfer/trctrain'
#sed -i '$isource "/opt/freesurfer7/SetUpFreeSurfer.sh"' "$ND_ENTRYPOINT"
# modify recon-all to only subsegment the thalamus
sed -i 's/set scrlist = (segmentHA_T1.sh segmentThalamicNuclei.sh segmentBS.sh)/set scrlist = (segmentThalamicNuclei.sh)/g' /opt/freesurfer7/bin/recon-all
apt-get update -qq
apt-get install -y -q --no-install-recommends \
dc \
file \
libfontconfig1 \
libfreetype6 \
libgl1-mesa-dev \
libgl1-mesa-dri \
libglu1-mesa-dev \
libice6 \
libncurses5 \
libxext6 \
libxpm-dev \
libxcursor1 \
libxft2 \
libxinerama1 \
libxrandr2 \
libxrender1 \
sudo \
wget
apt-get clean
rm -rf /var/lib/apt/lists/*
echo "Downloading FSL ..."
mkdir -p /opt/fsl-5.0.10
curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-5.0.10-centos6_64.tar.gz \
| tar -xz -C /opt/fsl-5.0.10 --strip-components 1
sed -i '$iecho Some packages in this container are non-free' $ND_ENTRYPOINT
sed -i '$iecho If you are considering commercial use of this container, please consult the relevant license:' $ND_ENTRYPOINT
sed -i '$iecho https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence' $ND_ENTRYPOINT
sed -i '$isource $FSLDIR/etc/fslconf/fsl.sh' $ND_ENTRYPOINT
echo "Installing FSL conda environment ..."
bash /opt/fsl-5.0.10/etc/fslconf/fslpython_install.sh -f /opt/fsl-5.0.10
export TMPDIR="$(mktemp -d)"
echo "Downloading MATLAB Compiler Runtime ..."
curl -fsSL --retry 5 -o "$TMPDIR/mcr.zip" https://ssd.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/glnxa64/MCR_R2014b_glnxa64_installer.zip
unzip -q "$TMPDIR/mcr.zip" -d "$TMPDIR/mcrtmp"
"$TMPDIR/mcrtmp/install" -destinationFolder /opt/freesurfer7/MCRv84 -mode silent -agreeToLicense yes
mv -n /opt/freesurfer7/MCRv84/v84/* /opt/freesurfer7/MCRv84/
rm -rf "$TMPDIR"
unset TMPDIR
#####################
chmod u+x /neurodocker/mainscript.sh
chmod u+x /neurodocker/combine_subnuclei.sh
chmod u+x /neurodocker/extract_vols_plot.py
chmod u+x /neurodocker/create_webpage_thalsubs.sh
echo '{
\n "pkg_manager": "apt",
\n "instructions": [
\n [
\n "base",
\n "Ubuntu:18.04"
\n ],
\n [
\n "_header",
\n {
\n "version": "generic",
\n "method": "custom"
\n }
\n ],
\n [
\n "freesurfer",
\n {
\n "version": "7.1.1"
\n }
\n ],
\n [
\n "fsl",
\n {
\n "version": "5.0.10"
\n }
\n ]
\n ]
\n}' > /neurodocker/neurodocker_specs.json
%environment
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export ND_ENTRYPOINT="/neurodocker/mainscript.sh"
export FREESURFER_HOME="/opt/freesurfer7"
export PATH="/opt/freesurfer7/bin:$PATH"
export FSLDIR="/opt/fsl-5.0.10"
export PATH="/opt/fsl-5.0.10/bin:$PATH"
export CONDA_DIR="/opt/miniconda-latest"
export PATH="/opt/miniconda-latest/bin:$PATH"
export PATH="/opt/miniconda-latest/envs/neuro/lib/python3.7/site-packages:$PATH"
export PYTHONPATH="/opt//miniconda-latest/envs/neuro/lib/python3.7/site-packages:$PYTHONPATH"
%files
license.txt /opt/freesurfer7/
mainscript_vcw256.sh /neurodocker/mainscript.sh
combine_subnuclei_v3.sh /neurodocker/combine_subnuclei.sh
extract_vols_plot.py /neurodocker/extract_vols_plot.py
create_webpage_thalsubs.sh /neurodocker/create_webpage_thalsubs.sh
QA_thalseg_v2.sh /neurodocker/QA_thalseg.sh
thalseg2html.py /neurodocker/thalseg2html.py
REFERENCE_1subj_thalQC.html /neurodocker/
REFERENCE_avg_thalQC.html /neurodocker/
%runscript
/neurodocker/mainscript.sh "$@"
Collection
- Name: chrisvriend/ENIGMA_subthal
- License: Other
View on Datalad
Metrics
key | value |
---|---|
id | /containers/chrisvriend-ENIGMA_subthal-s3cw256 |
collection name | chrisvriend/ENIGMA_subthal |
branch | build3 |
tag | s3cw256 |
commit | 678e96c78d09a22df6a524704c92740500a2298b |
version (container hash) | 3a2d4e8890fdb2533e1399d8a7045a15a39e1d1a3a863eb2f860c7fd6a70db73 |
build date | 2021-01-13T09:34:45.736Z |
size (MB) | 5522.30078125 |
size (bytes) | 5790552064 |
SIF | Download URL (please use pull with shub://) |
Datalad URL | View on Datalad |
Singularity Recipe | Singularity Recipe on Datalad |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.