Skip to content

Commit

Permalink
Needed to set PATH for fs_install_mcr to work
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Dec 27, 2023
1 parent 7a33894 commit 7938a1d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions def/hyakvnc-freesurfer-ubuntu22.04/Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7938a1d

Please sign in to comment.