[ESS] Emacs/ESS using Singularity container

James W. MacDonald jm@cdon @end|ng |rom uw@edu
Tue Nov 19 17:00:08 CET 2024


That's very helpful! One more question if you don't mind. In Lionel Henry's solution, he changes ess-customize-alist to map inferior-ess-r-program to the shell script that starts the container. If you have individual shell scripts in each analysis directory, I assume you are not doing that? Or do I misunderstand how ess-r-customize-alist works?

defun R-docker ()
  (interactive)
  (let ((ess-r-customize-alist
         (append ess-r-customize-alist
                 '((inferior-ess-r-program . <shell script location goes here>))))
		 (ess-R-readline t))
		 (R)))	

Thanks so much,

Jim

-----Original Message-----
From: ESS-help <ess-help-bounces using r-project.org> On Behalf Of Gavin Kelly via ESS-help
Sent: Tuesday, November 19, 2024 5:57 AM
To: ess-help using r-project.org
Subject: Re: [ESS] Emacs/ESS using Singularity container

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

______________________________________________
ESS-help using r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/ess-help__;!!K-Hz7m0Vt54!kZsw4QAGEjvgcvGm2yIOYXWL9HXVCyZ_xygq22RiCXRtb6Q4IJz1MNikuNEZm29gn1PWPusW0iaf79DkTx1U5wmJIpk$ 



More information about the ESS-help mailing list