Getting Started

This guide gets you from “installed” to a first successful submission.

Install

In a virtual environment:

pip install hpc-runner

Quick start: submit a job

Submit a batch job:

hpc run python -c 'print("hello")'

Show what would be submitted without actually submitting:

hpc run --dry-run python train.py

Run interactively (SGE: qrsh):

hpc run --interactive bash

Pass raw scheduler arguments using -- as a separator:

hpc run -q gpu.q -l gpu=1 -- python train.py

Or use submit for a config-driven shorthand:

submit -t gpu -n 4 python train.py

Pick a scheduler

By default, hpc-runner tries to auto-detect the scheduler. You can force it:

hpc --scheduler sge run "python train.py"

Or use the environment variable:

export HPC_SCHEDULER=sge

First config

Create a project-local config (safe to commit):

hpc config init

Create a user config:

hpc config init --global

Then open the file and set your site defaults, e.g. a default SGE queue:

[defaults]
queue = "batch.q"

See Configuration for the full configuration format and examples.