Commit 5e857fa0 authored by Sören Wacker's avatar Sören Wacker
Browse files

add bash and slurm tutorials, standardize shell-session format

- add beginner tutorials for bash and slurm basics
- update apptainer tutorial for new cluster (salloc, hostnames, GPU types)
- standardize all code blocks to use shell-session format
- document code block convention in README
- reorder tutorials: bash -> slurm -> apptainer
- move cite.md to end of about section
parent c0ff9b1b
Loading
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -23,6 +23,24 @@ This documentation follows the [Diataxis](https://diataxis.fr/) framework, which
- `docs/about/` - Explanation
- `support/` - Troubleshooting and contact information

### Code block conventions

Use `shell-session` for terminal examples. This syntax highlights the distinction between commands (prefixed with `$`) and output:

~~~markdown
```shell-session
$ hostname
daic01.hpc.tudelft.nl
$ squeue -u $USER
  JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
    294       all submit.s  netid01  R       0:02      1 gpu23
```
~~~

- Commands start with `$`
- Output has no prefix
- Interactive prompts like `Apptainer>` are shown as-is

## Running the website locally

Building and running the site locally requires a recent `extended` version of [Hugo](https://gohugo.io).
+1 −1
Original line number Diff line number Diff line
---
title: "How to Cite"
weight: 2
weight: 99
type: docs
description: "How to cite and acknowledge DAIC in publications."
---
+11 −11
Original line number Diff line number Diff line
@@ -13,9 +13,9 @@ Complete [First GPU Job](/quickstart/first-gpu-job/) to understand GPU job basic

Pull a PyTorch container from NVIDIA NGC:

```bash
cd /tudelft.net/staff-umbrella/<project>/containers
apptainer pull docker://nvcr.io/nvidia/pytorch:24.01-py3
```shell-session
$ cd /tudelft.net/staff-umbrella/<project>/containers
$ apptainer pull docker://nvcr.io/nvidia/pytorch:24.01-py3
```

## Create a test script
@@ -59,15 +59,15 @@ srun apptainer exec --nv \

## Submit and check output

```bash
sbatch container_gpu.sh
> Submitted batch job 305
```shell-session
$ sbatch container_gpu.sh
Submitted batch job 305

cat container_305.out
> PyTorch version: 2.2.0
> CUDA available: True
> GPU: NVIDIA L40
> GPU computation successful
$ cat container_305.out
PyTorch version: 2.2.0
CUDA available: True
GPU: NVIDIA L40
GPU computation successful
```

## Key options
+14 −14
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@ You should already be logged in to DAIC. If not, complete [First Login](/quickst

### 1. Create a working directory

```bash
mkdir -p ~/my-first-job && cd ~/my-first-job
```shell-session
$ mkdir -p ~/my-first-job && cd ~/my-first-job
```

### 2. Create a Python script
@@ -42,33 +42,33 @@ srun python hello.py

{{% alert title="Account required" color="warning" %}}
Replace `<your-account>` with your account name. Find yours with:
```bash
sacctmgr show associations user=$USER format=Account -P
```shell-session
$ sacctmgr show associations user=$USER format=Account -P
```
{{% /alert %}}

### 4. Submit the job

```bash
sbatch submit.sh
> Submitted batch job 294
```shell-session
$ sbatch submit.sh
Submitted batch job 294
```

### 5. Monitor the job

```bash
squeue -u $USER
>   JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
>     294       all submit.s  netid01  R       0:02      1 gpu23
```shell-session
$ squeue -u $USER
  JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
    294       all submit.s  netid01  R       0:02      1 gpu23
```

### 6. Check the output

Once completed, view the output file:

```bash
cat slurm_294.out
> Hello from gpu23.ethernet.tudhpc
```shell-session
$ cat slurm_294.out
Hello from gpu23.ethernet.tudhpc
```

## Request a GPU
+9 −9
Original line number Diff line number Diff line
@@ -21,8 +21,8 @@ Activate TU Delft network via [eduVPN](https://tudelft.eduvpn.nl/portal/home).

1. Open your terminal and run the following SSH command:

```bash
ssh <YourNetID>@daic01.hpc.tudelft.nl
```shell-session
$ ssh <YourNetID>@daic01.hpc.tudelft.nl
```

2. You will be prompted for your password. On first login, DAIC may also set up parts of your home environment:
@@ -53,13 +53,13 @@ It might take a few seconds to get your `$HOME` set. This is normal.

Run the following commands:

```bash
hostname
> daic01.hpc.tudelft.nl
pwd
> /home/<YourNetID>
whoami
> <YourNetID>
```shell-session
$ hostname
daic01.hpc.tudelft.nl
$ pwd
/home/<YourNetID>
$ whoami
<YourNetID>
```

If these commands return the expected values, your login was successful.
Loading