Skip to content

Commit

Permalink
Simplify by setting R_LIBS_USER only in rsession.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanweeks committed Dec 13, 2024
1 parent 3c003f3 commit b878f1d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions use/singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,11 @@ workdir=$(mktemp -d)
# Set R_LIBS_USER to an existing path specific to rocker/rstudio to avoid conflicts with
# personal libraries from any R installation in the host environment

R_LIBS_USER=${HOME}/R/rocker-rstudio/4.4.2
mkdir -p "${R_LIBS_USER}"

cat > ${workdir}/rsession.sh <<END
#!/bin/sh
export OMP_NUM_THREADS=${SLURM_CPUS_ON_NODE}
export R_LIBS_USER="${R_LIBS_USER}"
export R_LIBS_USER=${HOME}/R/rocker-rstudio/4.4.2
mkdir -p "\${R_LIBS_USER}"
## custom Rprofile & Renviron (default is $HOME/.Rprofile and $HOME/.Renviron)
# export R_PROFILE_USER=/path/to/Rprofile
# export R_ENVIRON_USER=/path/to/Renviron
Expand Down

0 comments on commit b878f1d

Please sign in to comment.