Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

Requirements

  • Linux or WSL
  • Rust toolchain with cargo
  • systemd --user if you want automatic daemon management
  • nvidia-smi if you want automatic GPU detection

Clone the Repository

git clone https://github.com/ymgaq/slotd.git
cd slotd

Install with the Provided Script

From the repository root:

./scripts/install.sh

By default this will:

  • build slotd in release mode
  • install slotd under ~/.local/bin
  • create command aliases such as sbatch and squeue
  • create a runtime root under ~/.local/share/slotd
  • write ~/.config/slotd/slotd.env
  • install and start a systemd --user service

Installer Options

OptionDescriptionDefault
--repo-root PATHBuild from a different repository rootcurrent repo
--profile NAMECargo profile to buildrelease
--install-bin-dir PATHInstall binary and alias directory~/.local/bin
--runtime-root PATHRuntime root used as SLOTD_ROOT~/.local/share/slotd
--config-dir PATHConfiguration directory~/.config/slotd
--systemd-user-dir PATHUser unit directory~/.config/systemd/user
--cpu-partitions VALUEValue for SLOTD_CPU_PARTITIONScpu
--gpu-partitions VALUEValue for SLOTD_GPU_PARTITIONSgpu
--features VALUEValue for SLOTD_FEATURESunset
--notify-cmd VALUEValue for SLOTD_NOTIFY_CMDunset
--cgroup-base PATHValue for SLOTD_CGROUP_BASEunset
--skip-buildReuse an existing build outputoff
--skip-systemdDo not install or start a user serviceoff
--uninstallRemove the installed setupoff
--purge-runtimeRemove persisted state during uninstalloff

Example:

./scripts/install.sh \
  --features cpu,gpu \
  --notify-cmd 'notify-send "slotd" "$SLOTD_JOB_ID $SLOTD_JOB_STATE"'

If you set --cgroup-base, use a writable cgroup v2 subtree. Leaving it unset keeps CPU and memory as reservation-only scheduling values.

Uninstall

Remove the installation:

./scripts/install.sh --uninstall

Remove installation and runtime state:

./scripts/install.sh --uninstall --purge-runtime

Manual Setup

If you do not want to use the installer, you can still build and run slotd directly:

cargo build --release
SLOTD_ROOT="$HOME/.local/share/slotd" ./target/release/slotd daemon

Then use the same SLOTD_ROOT in another shell:

SLOTD_ROOT="$HOME/.local/share/slotd" ./target/release/slotd sbatch --wrap 'echo hello'

Runtime Files

The default runtime root is:

~/.local/share/slotd

Important files and directories:

  • run/slotd.sock
  • lib/state.db
  • lib/jobs/<job_id>/

The client and the daemon must use the same SLOTD_ROOT.