Skip to content

Commit

Permalink
Merge pull request #198 from NeuroDesk:bug_fix_environment_variables_…
Browse files Browse the repository at this point in the history
…in_notebooks

set environment variable SINGULARITY_BINDPATH
  • Loading branch information
stebo85 authored Nov 28, 2023
2 parents 6108542 + e8c4d94 commit 7c4f261
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ RUN cp -rp /home/${NB_USER} /tmp/
# Set up data directory so it exists in the container for the SINGULARITY_BINDPATH
RUN mkdir -p /data




# Install neurocommand
ADD "https://api.github.com/repos/neurodesk/neurocommand/git/refs/heads/main" /tmp/skipcache
RUN rm /tmp/skipcache \
Expand All @@ -403,4 +406,6 @@ ADD "https://api.github.com/repos/neurodesk/example-notebooks/git/refs/heads/mai
RUN rm /home/${NB_USER}/skipcache \
&& git clone --depth 1 https://github.com/NeuroDesk/example-notebooks

# Set SINGULARITY_BINDPATH and MODULEPATH here so it's available within a notebook (the startup scripts set these things too late):
ENV SINGULARITY_BINDPATH=/data,/neurodesktop-storage,/tmp,/cvmfs,/home/${NB_USER}:/home/matlab/.matlab/R2022a_licenses,/home/${NB_USER}:/opt/matlab/R2022a/licenses
ENV MODULEPATH=/cvmfs/neurodesk.ardc.edu.au/containers/modules/
2 changes: 2 additions & 0 deletions config/jupyter/environment_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ if [ -d /cvmfs/neurodesk.ardc.edu.au/neurodesk-modules ]; then
export MODULEPATH=`echo $MODULEPATH | sed 's/ /:/g'`
fi

# This also needs to be set in the Dockerfile, so it is available in a jupyter notebook
export SINGULARITY_BINDPATH=/data,/neurodesktop-storage,/tmp,/cvmfs,/home/${NB_USER}:/home/matlab/.matlab/R2022a_licenses,/home/${NB_USER}:/opt/matlab/R2022a/licenses
# This also needs to be set in the Dockerfile, so it is available in a jupyter notebook

export SINGULARITYENV_SUBJECTS_DIR=/home/${NB_USER}/freesurfer-subjects-dir
export MPLCONFIGDIR=/home/${NB_USER}/.config/matplotlib-mpldir
Expand Down

0 comments on commit 7c4f261

Please sign in to comment.