Open MiguelRodo opened 10 hours ago
apptainer
in writable modeSo, the /workspaces
folder is read only. This might be a problem. Should be just run apptainer in like editable mode?
apptainer build --sandbox comp24stimgate/ comp24stimgate.sif
apptainer shell --writable comp24stimgate/
Skipping mount /scratch [binds]: /scratch doesn't exist in container
ls /
shows that scratch is definitely not there.R --vanilla
. I don't know why...cd
'd to the apptainer cache directory.apptainer overlay create --size 2024 comp24stimgate.img --fakeroot
--fakeroot
necessary for ability to do things as root
within the container, e.g. install packagesapptainer exec --fakeroot --overlay comp24st imgate.img comp24stimgate.sif bash
exec
rather than run
as the rstudio
base image wants to run rstudio in a server, and so you don't have access to the terminalIn GitHub codespaces, this is the path to the project library (i.e. this directory exists):
/workspaces/.local/lib/R/library/stimgate-9684ce2c
and renv
does want to use it:
.libPaths()
[1] "/workspaces/.local/lib/R/library/stimgate-9684ce2c/linux-ubuntu-noble/R-4.4/x86_64-pc-linux-gnu"
[2] "/root/.cache/R/renv/sandbox/linux-ubuntu-noble/R-4.4/x86_64-pc-linux-gnu/25ebdc09"
On the HPC, however, this path does not exist, but a different one:
"/workspaces/.local/lib/R/library/stimgate-acc61424"
I am pretty sure the images used are the same. I've rebuilt the GitHub Codespace using a prebuild, and it's the same as before, and the image on the hpc was built this morning but the image in GHCR was last updated two days ago.
Okay, anyway, so that's the project library. We can install into it, no problem.
So, to allow installation, we needed to change the RENV paths as follows in ~/.Renviron
:
R_LIBS=/scratch/01463748/.local/lib/R
RENV_PATHS_LIBRARY_ROOT=/scratch/01463748/.local/lib/R/library
RENV_PATHS_CACHE=/renv/cache
RENV_PATHS_ROOT=/scratch/01463748/.local/lib/R/librar
The cache permissions are all full.
Site-wide .Renviron file
When you start R on the HPC, these are active