Re: Emacs/ESS using Singularity container
Gavin Kelly via ESS-help <[email protected]> Tue, 19 Nov 2024 10:56:49 +0000
| Newsgroups | gmane.emacs.ess.general |
|---|---|
| Message-ID | <GVXPR05MB111755F70E7E1FBB262CBEC48B8202@GVXPR05MB11175.eurprd05.prod.outlook.com> |
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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help