[ESS] Emacs/ESS using Singularity container

Gavin Kelly G@v|n@Ke||y @end|ng |rom cr|ck@@c@uk
Tue Nov 19 11:56:49 CET 2024


I'm running ESS in similar HPC circumstances, and have adopted a similar solution to the one in Lionel Henry's post.  I tend to keep a shell script along the lines of the following in every project, and it works 'fine'. It's singularity, but I think apptainer is equivalent.  Just in case it helps.



```
pwd=$(realpath ${PWD})
project_root=$(realpath $(git rev-parse --show-toplevel || echo ${pwd))
extra=--bind $HOME/.Xauthority,$HOME/.Xdefaults,$HOME/.Xresources,$HOME/.emacs.d,$HOME/.ssh --env DISPLAY=$DISPLAY # in real life, $extra is defined in elsewhere and is only used in interactive sessions, not in e.g. makefiles.
cmd=R
image=bioconductor_docker_3.18-R-4.3.2.sif
singularity exec --bind ${project_root},/tmp --pwd ${pwd} --containall --cleanenv  --env SQLITE_TMPDIR=/tmp,BIOCPARALLEL_WORKER_NUMBER=2,GITHUB_PAT=${GITHUB_PAT} ${extra} ${image} ${cmd} $@
```
The Francis Crick Institute Limited is a registered charity in England and Wales no. 1140062 and a company registered in England and Wales no. 06885462, with its registered office at 1 Midland Road London NW1 1AT



More information about the ESS-help mailing list