diff --git a/def/hyakvnc-freesurfer-ubuntu22.04/Singularity b/def/hyakvnc-freesurfer-ubuntu22.04/Singularity index 6713214..8da6df0 100644 --- a/def/hyakvnc-freesurfer-ubuntu22.04/Singularity +++ b/def/hyakvnc-freesurfer-ubuntu22.04/Singularity @@ -54,10 +54,15 @@ This is an Apptainer container of Ubuntu 22.04 with FreeSurfer installed. It is "{{RECON_ALL_CLINICAL_URL}}" || { echo "warning: curl failed!" >&2; exit 1; } chmod a+x /usr/local/freesurfer/{{FREESURFER_VERSION}}/bin/recon-all-clinical.sh - if [ -n "{{ MCR_VERSION }}" ]; then + # Install Matlab Compiler Runtime (MCR) if requested: + if [ -n "{{MCR_VERSION}}" ]; then # Install MCR dependencies: apt-get install -y libxt-dev libxext-dev libncurses5 + # Set the environment variables for fs_install_mcr to work: + export FREESURFER_HOME="/usr/local/freesurfer/{{FREESURFER_VERSION}}" + export PATH="${FREESURFER_HOME}/bin:${PATH}" + # Install MCR: fs_install_mcr "{{MCR_VERSION}}" fi @@ -80,7 +85,7 @@ This is an Apptainer container of Ubuntu 22.04 with FreeSurfer installed. It is export MNI_DATAPATH="${FREESURFER_HOME}/mni/data" export PERL5LIB="${MINC_LIB_DIR}/perl5/5.8.5" export MNI_PERL5LIB="${MINC_LIB_DIR}/perl5/5.8.5" - export PATH="${FREESURFER_HOME}/bin:${FREESURFER_HOME}/tktools:${MINC_BIN_DIR}:$PATH" + export PATH="${FREESURFER_HOME}/bin:${FREESURFER_HOME}/tktools:${MINC_BIN_DIR}:${PATH}" export FS_LICENSE="${FS_LICENSE:-${HOME}/${USER}/.freesurfer_license.txt}" %labels