Skip to content

Commit a83f911

Browse files
20260223 - updates
1 parent 80d9f33 commit a83f911

1 file changed

Lines changed: 25 additions & 23 deletions

File tree

hpc.qmd

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ cd /Users/itpetersen/Documents/Projects/Test/
100100

101101
Steps:
102102

103-
1. Install Windows Subsystem for Linux (WSL)
103+
1. If you are Windows, install Windows Subsystem for Linux (WSL)
104104
- In PowerShell (Admin):
105105
```bash
106106
wsl --install
@@ -138,23 +138,23 @@ Steps:
138138
```bash
139139
apptainer --version
140140
```
141-
- If not available via apt (`E: Unable to locate package apptainer`), install from source (specify the version number for the latest release version available; see release versions [here](https://github.com/apptainer/apptainer/releases)):
142-
```bash
143-
export VERSION=1.4.5
144-
wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer-${VERSION}.tar.gz
145-
tar -xzf apptainer-${VERSION}.tar.gz
146-
cd apptainer-${VERSION}
147-
```
148-
- If you installed from source, build Apptainer:
149-
```bash
150-
./mconfig
151-
make -C builddir
152-
sudo make -C builddir install
153-
```
154-
- Verify installation:
155-
```bash
156-
apptainer --version
157-
```
141+
- If not available via apt (`E: Unable to locate package apptainer`), install from source (specify the version number for the latest release version available; see release versions [here](https://github.com/apptainer/apptainer/releases)):
142+
```bash
143+
export VERSION=1.4.5
144+
wget https://github.com/apptainer/apptainer/releases/download/v${VERSION}/apptainer-${VERSION}.tar.gz
145+
tar -xzf apptainer-${VERSION}.tar.gz
146+
cd apptainer-${VERSION}
147+
```
148+
- If you installed from source, build Apptainer:
149+
```bash
150+
./mconfig
151+
make -C builddir
152+
sudo make -C builddir install
153+
```
154+
- Verify installation:
155+
```bash
156+
apptainer --version
157+
```
158158
1. Create your `R` Container Definition File
159159
- Inside the Ubuntu terminal, run:
160160
```bash
@@ -188,7 +188,7 @@ Steps:
188188
git \
189189
sudo
190190
191-
# Install core CRAN packages
191+
# Install core CRAN packages (specify the packages to install here)
192192
R -e "install.packages(c(
193193
'tidyverse',
194194
'data.table',
@@ -254,15 +254,16 @@ Steps:
254254
q()
255255
```
256256
1. Copy the Container to Your Computer
257-
- Inside the Ubuntu terminal, run (updating your path):
257+
- Inside the Ubuntu terminal, run (updating your path; this is equivalent to: `E:/Documents/OneDrive - University of Iowa/Research/Containers/`):
258258
```bash
259259
cp ~/apptainer-1.4.5/r_argon.sif "/mnt/e/Documents/OneDrive - University of Iowa/Research/Containers/"
260260
```
261261
1. Copy the Container to Argon
262-
- Use WinSCP to transfer the `.sif` file to Argon: `/old_Users/itpetersen/Documents/Containers/`
262+
- Use WinSCP to transfer the `.sif` file to Argon (updating your path): `/old_Users/itpetersen/Documents/Containers/`
263263
1. Test Container on Argon
264264
- Inside the Ubuntu terminal, run:
265265
```bash
266+
cd /Users/itpetersen/Documents/Containers
266267
apptainer exec r_argon.sif R
267268
```
268269
- Check `R` version:
@@ -283,9 +284,10 @@ Steps:
283284
- e.g.:
284285
```bash
285286
# Run R inside your container
286-
/usr/bin/apptainer exec /old_Users/itpetersen/Documents/Containers/r_argon.sif \
287+
/usr/bin/apptainer exec /Users/itpetersen/Documents/Containers/r_argon.sif \
287288
Rscript my_script.R
288289
```
290+
For an example job script using a container, see @sec-jobScript.
289291

290292
# Linux
291293

@@ -341,7 +343,7 @@ cd path
341343

342344
`module load stack/2022.2`
343345

344-
## Job Script
346+
## Job Script {#sec-jobScript}
345347

346348
```bash
347349
#!/bin/sh

0 commit comments

Comments
 (0)