Expand description
Halldyll Starter - RunPod orchestration library.
A comprehensive library for managing RunPod GPU pods with:
- Provisioning: Create new pods via REST API
- Starting: Start/stop existing pods with retry logic
- State Management: Persist and reconcile pod state
- GraphQL Client: Full GraphQL API access for advanced operations
- Orchestration: High-level pod management with automatic reconciliation
§Quick Start
All configuration is loaded from environment variables. Create a .env file:
RUNPOD_API_KEY=your_api_key_here
RUNPOD_IMAGE_NAME=your/image:tag
RUNPOD_POD_NAME=my-pod
RUNPOD_GPU_TYPE_IDS=NVIDIA A40Then use the orchestrator for simple pod management:
ⓘ
use halldyll_starter::runpod_orchestrator::{RunpodOrchestrator, RunpodOrchestratorConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let cfg = RunpodOrchestratorConfig::from_env()?;
let orchestrator = RunpodOrchestrator::new(cfg)?;
let pod = orchestrator.ensure_ready_pod().await?;
println!("Pod ready: {} at {}", pod.name, pod.public_ip);
if let Some((host, port)) = pod.ssh_endpoint() {
println!("SSH: ssh -p {} user@{}", port, host);
}
Ok(())
}Re-exports§
pub use runpod_client::RunpodClient;pub use runpod_client::RunpodClientConfig;pub use runpod_orchestrator::PodLease;pub use runpod_orchestrator::RunpodOrchestrator;pub use runpod_orchestrator::RunpodOrchestratorConfig;pub use runpod_provisioner::RunpodProvisionConfig;pub use runpod_provisioner::RunpodProvisioner;pub use runpod_starter::RunpodStarter;pub use runpod_starter::RunpodStarterConfig;pub use runpod_state::JsonFileStateStore;pub use runpod_state::PlannedAction;pub use runpod_state::RunPodState;pub use runpod_state::StateStore;
Modules§
- runpod_
client - GraphQL client for advanced RunPod API operations.
- runpod_
orchestrator - High-level pod orchestration.
- runpod_
provisioner - Pod provisioning via RunPod REST API.
- runpod_
starter - Pod starter for managing existing pods via REST API.
- runpod_
state - State persistence and reconciliation.