A lightweight job queue for shared GPU servers without SLURM.
-
Clone the repository:
git clone https://github.com/yourusername/gpu-queue.git cd gpu-queue -
Install with
uv(Recommended):uv pip install -e .
-
Start the Scheduler:
# Run in foreground (for testing/debugging) gpu-queue serve --min-free 2 --max-use 6 # OR Start background daemon gpu-queue start --min-free 2 --max-use 6
--min-freepreserves that many physically idle GPUs. GPUs occupied by other users do not count toward this reserve.--max-usecaps how many GPUs gpu-queue jobs may occupy at once. -
Submit Jobs:
gpu-queue add "python train.py --config config.yaml" --gpus 4 --priority high gpu-queue add "bash scripts/eval.sh" --gpus 1 --front
-
Monitor & Manage (TUI): Open the interactive dashboard:
gpu-queue watch
Keybindings:
v: Enter/leave select mode for bulk actionsd: Duplicate selected job into Stagingn: Create a new staged jobe: Edit selected staged job / Save staged changessorEnter(in Staging): Send staged job to Pending (with confirmation)b(in Pending): Move selected pending job back to the top of Stagingc: Discard staged job, or cancel pending/running jobJ/K(in Pending): Move selected job down/up in queue orderSpace: View logs (internal viewer)L: View logs in external viewer (less)p: Pause/Resume running jobr: Retry completed job into Stagingx: Remove completed job
In select mode,
j/kextend the selected rows as you move.Escclears the selection. Batch-safe commands apply to all selected rows in the active panel:b,c,s,d,p,r,x, and pendingJ/Kreorder. Edit and logs remain cursor-only.Interactive Editing:
- Enter Edit Mode: Press
eon a staged job, or create one vian. - Navigation: Use
h/lto switch between GPUs and Command fields. - Modify Values: Use
j/kto decrease/increase GPU count. - Edit Command: Select the Command field and press
Enterto open your system editor. - Save: Press
eto save staged changes. - Cancel: Press
Escto discard changes.
-
Install Dev Dependencies:
uv sync
-
Install Pre-commit Hooks (Important for contributing):
uv run pre-commit install
This ensures code style checks run before every commit.