Skip to content

Commit

Permalink
docs: update admin and setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Dec 13, 2023
1 parent f19282f commit 6f6248a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 6 deletions.
33 changes: 30 additions & 3 deletions docs/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,40 @@

We offer the custom command `userctl` to manage users on the server.
Please do **not** use the standard Linux commands (e.g., `useradd`, `adduser`, ...)!
The script allows to add, remove, and edit users.
Please run `sudo userctl --help` for more information.
In addition to adding, removing, and editing users, `userctl` also manages the ZFS dataset for the user.
Run `sudo userctl --help` for more information.

Users on this server are identified by their university email address.
Thus, `userctl` expects the full email address as argument.
When creating student accounts, please provide `--expire-date` to automatically disable login after their project is finished.

### Adding Users

When creating student accounts, you need to provide the full name of the student via `--full-name`.
Please also provide `--expire-date` to automatically disable login after their project is finished.
We recommend to set the date to nine months after the account creation, this should cover most use cases.
Also consider adding a quota to the user, e.g., `--quota 100G`.

```shell
sudo userctl add [email protected] --full-name "Full Name" --expire-date 2022-12-31 --quota 100G
```

### Removing Users

When removing users, you can choose to keep the data by adding `--keep-home`.

```shell
sudo userctl remove [email protected]
```

### Editing Users

You may change the expiration date and the quota of a user at any time.

```shell
sudo userctl edit [email protected] --expire-date 2022-12-31 --quota 100G
```

If one of these options is not provided, the current value will be kept.

## Process Management

Expand Down
16 changes: 13 additions & 3 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ The package(s) `uidmap` are needed for rootless podman.

```shell
sudo apt update
sudo apt upgrade -y
sudo apt install -y git curl wget uidmap
```

Then install nix using the [DeterminateSystems installer](https://github.com/DeterminateSystems/nix-installer).

```shell
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```

Afterwards, open a new shell to apply the changes (e.g., exit and reconnect via ssh).
Then we can apply the system manager configuration for the first time.

Expand All @@ -41,6 +47,10 @@ sudo apt install -y cuda nvidia-container-toolkit

Restart the server to load the new driver.

```shell
sudo reboot
```

## Additional Setup

The following script sets up some basic configuration for the server.
Expand All @@ -55,8 +65,8 @@ sudo nix run github:wi2trier/gpu-server#setup
Correctly setting up the CUDA drivers is crucial, so please verify that the following commands work as expected.

```shell
CUDA_VISIBLE_DEVICES=0 apptainer run --nv docker://nvidia/cuda:12.3.0-runtime-ubuntu22.04 nvidia-smi
podman run --rm --device nvidia.com/gpu=0 nvidia/cuda:12.3.0-runtime-ubuntu22.04 nvidia-smi
CUDA_VISIBLE_DEVICES=0 apptainer run --nv docker://ubuntu nvidia-smi
podman run --rm --device nvidia.com/gpu=0 ubuntu nvidia-smi
```

In addition, you may test the setup using the `pytorch` image:
Expand All @@ -69,7 +79,7 @@ podman run --rm --device nvidia.com/gpu=0 pytorch/pytorch python -c "import torc
The new Apptainer runtime using `nvidia-container-cli` currently does not work:

```shell
CUDA_VISIBLE_DEVICES=0 apptainer --debug run --nvccli docker://nvidia/cuda:12.3.0-runtime-ubuntu22.04 nvidia-smi
CUDA_VISIBLE_DEVICES=0 apptainer --debug run --nvccli docker://ubuntu nvidia-smi
```

## Uninstall
Expand Down

0 comments on commit 6f6248a

Please sign in to comment.