Batch Job Commands: batchjob
Batch Jobs are asynchronous, non-interactive workloads. The namespace alias is bj.
Commands
| Command | Usage | Description |
|---|---|---|
machine list | bohr batchjob machine list [flags] | List Batch Job machine types and SKU IDs |
submit | bohr batchjob submit [flags] | Upload optional input and submit a Batch Job |
list | bohr batchjob list [flags] | List and filter Batch Jobs |
describe | bohr batchjob describe <job_id> | Get one Batch Job; alias get |
wait | bohr batchjob wait <job_id> [flags] | Wait for a terminal status |
download | bohr batchjob download <job_id> [flags] | Download and safely extract results |
kill | bohr batchjob kill <job_id> [flags] | Stop a Batch Job |
Select a machine
bohr batchjob machine list
bohr batchjob machine list --choose-type gpu -o json
--choose-type accepts cpu or gpu. You may submit with the returned machine type or numeric SKU ID.
Submit
bohr batchjob submit \
--image registry.dp.tech/dptech/ubuntu:22.04 \
--machine-type <machine_type> \
--command "python main.py" \
--input ./workdir \
--project-id 123
Required inputs are --image, --command, and either --machine-type or --sku-id. Other useful flags include --name, --max-run-time (default 24h), --max-wait-time (default 30m), and repeatable --out-file.
Submission creates a billable compute resource. Use --dry-run to validate locally, then confirm the real submission when prompted.
Monitor and download
bohr batchjob list --status running --page-size 20
bohr batchjob describe <job_id> -o json
bohr batchjob wait <job_id> --interval 5s --timeout 24h
bohr batchjob download <job_id> --dest ./result --timeout 2h
The --dest directory for download is required and must not already exist. The CLI downloads and safely extracts the result archive without printing its signed URL.
Stop a Batch Job
bohr batchjob kill <job_id>
The command requires confirmation and waits for the terminal state by default. Add --no-wait to return after the stop request is accepted.