Skip to content

Commit ef31b3b

Browse files
committed
Add some notes on using R on the server
1 parent 194facd commit ef31b3b

File tree

2 files changed

+62
-2
lines changed

2 files changed

+62
-2
lines changed

docs/server/setup.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ environment on the SODAS server.
55

66
## Projects
77

8-
All [compute projects](https://kunet.ku.dk/work-areas/research/Research%20Infrastructure/research-it/ucph-computing-hpc-systems/Pages/default.aspx#collapse-6e12687c-613f-4ac4-9d30-696f72764925) are stored in the `/projects/ `folder.
8+
All [compute projects](https://kunet.ku.dk/work-areas/research/Research%20Infrastructure/research-it/ucph-computing-hpc-systems/Pages/default.aspx#collapse-6e12687c-613f-4ac4-9d30-696f72764925) are stored in the `/projects/`folder.
99

1010
```bash
1111
abc123@sodashead01fl /projects/main_compute-AUDIT $ tree -L 1
@@ -162,6 +162,18 @@ echo "alias jlab=\"jupyter-lab --port=8880 --ip=10.84.10.216 --no-browser\"" >>
162162
echo "alias jadd=\"python -m ipykernel install --user --display-name \${PWD} --name \${PWD##*/}\"" >> ~/.bashrc
163163
```
164164

165+
#### neovim
166+
167+
```bash
168+
mkdir -p ~/downloads
169+
mkdir -p ~/.local/bin
170+
cd ~/downloads
171+
wget https://github.com/neovim/neovim-releases/releases/download/v0.11.3/nvim-linux-x86_64.appimage
172+
chmod u+x nvim-linux-x86_64.appimage
173+
ln -s ~/downloads/nvim-linux-x86_64.appimage ~/.local/bin/nvim
174+
# alternatively: mv ~/downloads/nvim-linux-x86_64.appimage ~/.local/bin/nvim
175+
```
176+
165177
#### zsh
166178

167179
In this step of the guide, we will take you throw setting up zsh

docs/server/usage.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,54 @@ And unload again:
2929
module unload <module-name>
3030
```
3131

32+
### udocker
33+
34+
```bash
35+
module load anaconda3/2020.11
36+
module load udocker
37+
```
38+
39+
### Using R
40+
41+
`R` depends on other modules; hence we load those before `R`.
42+
43+
```bash
44+
module load gcc/13.2.0
45+
module load openjdk/20.0.0
46+
module load R/4.4.2
47+
```
48+
49+
#### Source loader script
50+
51+
- add a helper script that loads the relevant modules
52+
- source the script to make the modules available
53+
54+
```bash
55+
echo '#!/usr/bin/env bash
56+
57+
module load gcc/13.2.0
58+
module load openjdk/20.0.0
59+
module load R/4.4.2' \
60+
> ~/scripts/load-R.sh
61+
62+
source ~/scripts/load-R.sh
63+
```
64+
65+
#### Add minimal Rprofile
66+
67+
- the config file below specifies where new packages to should be installed and
68+
what the default CRAN mirror is
69+
- create the file `~/.Rprofile` and insert the lines below (with your `kuid`
70+
instead of abc123)
71+
72+
```
73+
# Set default library path (where packages are installed)
74+
.libPaths("/home/abc123/R/x86_64-pc-linux-gnu-library/4.4")
75+
76+
# Set default CRAN mirror
77+
options(repos = c(CRAN = "https://cran.r-project.org"))
78+
```
79+
3280
## Slurm
3381

3482
Slurm is a job scheduler and resource manager for the compute resources available.
@@ -337,7 +385,7 @@ module load udocker
337385

338386
The [UCPH guide](https://kunet.ku.dk/work-areas/research/Research%20Infrastructure/research-it/ucph-computing-hpc-systems/Pages/default.aspx#collapse-50aac726-e136-4ede-81aa-29a158043dac) to HPC systems
339387

340-
Five part [ video series ](https://www.youtube.com/watch?v=K_JIPrcPHCg&list=PL7kL5D8ITGyUO4_x5EvVmZ6_NBV0RnDF-) introducing Slurm
388+
Five part [video series](https://www.youtube.com/watch?v=K_JIPrcPHCg&list=PL7kL5D8ITGyUO4_x5EvVmZ6_NBV0RnDF-) introducing Slurm
341389

342390
The official [slurm cheatsheet](https://slurm.schedmd.com/pdfs/summary.pdf)
343391

0 commit comments

Comments
 (0)