Open the Pod Bay Door, Hal: run model-backed scripts on RunPod.
Project description
OPBDH
Open the Pod Bay Door, Hal — “Of course I can do it, Dave.”
Launches a GPU pod, runs your model-backed script on it, syncs the results home, and deletes the pod.
First launch
pip install opbdh
opbdh
Running opbdh unconfigured starts a setup wizard: it picks a provider (RunPod or Prime Intellect), checks your API token (RUNPOD_API_TOKEN / PRIME_INTELLECT_API_KEY), and asks for defaults — model, code path, minimum VRAM, price caps — saved globally or per project.
Needs macOS or Linux, Python ≥ 3.11, and ssh/scp on your PATH. An existing ~/.ssh keypair is used if present, otherwise one is generated under ~/.config/opbdh/ssh/. Set HF_TOKEN for private/gated Hugging Face models.
Launch a pod
opbdh launch ./run.py --model Qwen/Qwen2.5-0.5B-Instruct --vram-gb 48 --max-spend 5
This verifies your code, picks the cheapest fitting GPU, launches the pod, runs your command, streams remote logs/ and results/ into runpod_results/<run_id>/, stops the run if estimated spend crosses the cap, and deletes the pod when it finishes — or fails. Add --dry-run to print the plan without contacting the provider; real launches ask for confirmation unless --yes.
Features
- 🚀 One command, whole mission — verify, pick a GPU, launch, run, sync results, clean up
- 💸 Cost-aware by default — hourly price caps, a hard max-spend guard, a confirmation gate
- 🎯 GPU selection from a budget — say how much VRAM and how many dollars
- 💾 Persistent model cache — network volumes sized from the model's real weight files, reused across runs (RunPod)
- 🧪 Nothing launches unverified — static checks and a
--dry-runmode - 🧙 Wizards or flags — first-run setup,
opbdh config wizard,opbdh run wizard; or plain flags (each with a one-letter short form) and layered JSON config - ☁️ Two providers — RunPod (default) or Prime Intellect's multi-cloud marketplace via
--provider primeintellect - 👁️ HAL watches your money — a pulsing red eye with elapsed time and estimated spend (TTY only;
OPBDH_NO_HAL=1to silence)
Options
Flags override a local opbdh.json/.opbdh.json, which overrides ~/.config/opbdh/config.json. String values support {cwd}-style placeholders and $VARs.
| Flag | What it does |
|---|---|
--model, -m |
Hugging Face model id (model_id in config) |
--command, -x |
Remote shell command; defaults from the code path |
--provider, -p |
runpod (default) or primeintellect |
--vram-gb, -v |
Minimum GPU VRAM |
--max-dollars-per-hour, -d |
Cap on the estimated hourly price |
--max-spend, -s |
Spend guard: stop the run past this estimated total |
--network-volume-id, -V |
Attach an existing RunPod network volume |
--auto-network-volume, -a |
Create/reuse a volume named opbdh-{model_slug}, sized from the weights |
--network-volume-data-center-id, -D |
Data center for auto-created volumes, e.g. EU-RO-1 |
--min-vcpu-per-gpu, -u |
Minimum host vCPUs per GPU |
--min-ram-per-gpu, -r |
Minimum host RAM per GPU, in GB |
--config, -c |
Explicit path to a local JSON config |
--dry-run, -n |
Verify and print the plan; never contacts the provider |
--yes, -y |
Skip the billable-compute confirmation |
Config-only keys, one each: image (Docker tag, or Prime Intellect environment name), cloud_type (SECURE/COMMUNITY/ALL), container_disk_gb, pod_volume_gb, network_volume_name, network_volume_size_gb, pre_download_model (default on), results_dir, poll_seconds, failure_keepalive_seconds (debug window on failure, default 120 s), keep_pod_on_success, ssh_key/ssh_public_key.
Other commands, one each: opbdh plan (show the plan for a run), opbdh verify (static checks only), opbdh gpus (GPU candidates and prices), opbdh models search/size (find models, weight size + suggested volume), opbdh config show/write/wizard.
On the pod, your script runs with OPBDH_MODEL_ID, OPBDH_RESULTS_DIR, and the HF cache variables set; a sibling requirements.txt is pip-installed; write to logs/ and results/ and they come home. Network volumes are never deleted by OPBDH and bill by the GB-month — clean them up in the RunPod console.
Development
pip install -e ".[dev]"
ruff check .
pytest
See RELEASING.md for releases. MIT — unlike HAL, this software is incapable of refusing to open the pod bay door, becoming sentient, or reading lips.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opbdh-1.2.0.tar.gz.
File metadata
- Download URL: opbdh-1.2.0.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b48ca7f37025c6e6e24ab445be2ad4c404488a9895344356c8fbfbbff3b2746
|
|
| MD5 |
83cabb4b660868514ea8ad5b415607dc
|
|
| BLAKE2b-256 |
e35be82e410c91c6bf5445daebe148181c275a98b42cf21439053ef71b0b8fac
|
Provenance
The following attestation bundles were made for opbdh-1.2.0.tar.gz:
Publisher:
publish.yml on lumpenspace/opbdh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opbdh-1.2.0.tar.gz -
Subject digest:
3b48ca7f37025c6e6e24ab445be2ad4c404488a9895344356c8fbfbbff3b2746 - Sigstore transparency entry: 2122951329
- Sigstore integration time:
-
Permalink:
lumpenspace/opbdh@55019534ac289b5101b2882fed48e9d2a851b44a -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/lumpenspace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55019534ac289b5101b2882fed48e9d2a851b44a -
Trigger Event:
release
-
Statement type:
File details
Details for the file opbdh-1.2.0-py3-none-any.whl.
File metadata
- Download URL: opbdh-1.2.0-py3-none-any.whl
- Upload date:
- Size: 38.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6eb64dd26d43acb8d9eb3d3103d3bea08bde99a0fe6b87497b2d5493d83b0a6
|
|
| MD5 |
f05fc2b4719fa7c040df4e445b759bf9
|
|
| BLAKE2b-256 |
fafb8c58daa2a591b0846732aac2b7c4dfc656de2eaf6f3bcdae0098b20e3823
|
Provenance
The following attestation bundles were made for opbdh-1.2.0-py3-none-any.whl:
Publisher:
publish.yml on lumpenspace/opbdh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opbdh-1.2.0-py3-none-any.whl -
Subject digest:
a6eb64dd26d43acb8d9eb3d3103d3bea08bde99a0fe6b87497b2d5493d83b0a6 - Sigstore transparency entry: 2122951398
- Sigstore integration time:
-
Permalink:
lumpenspace/opbdh@55019534ac289b5101b2882fed48e9d2a851b44a -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/lumpenspace
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55019534ac289b5101b2882fed48e9d2a851b44a -
Trigger Event:
release
-
Statement type: