Add your description here
Project description
Geunduun
Geunduun is a lightweight toolkit for orchestrating remote GPU workloads on RunPod. It offers a Python interface for provisioning pods via the RunPod REST API, shaping lifecycle management, and building thin Docker wrappers that can wrap arbitrary commands in a reproducible environment.
Features
- Build a RunPod-ready wrapper image on top of any base Docker image.
- Launch pods via the RunPod REST API and retrieve their identifiers for downstream tracking.
- Poll pod status and map responses to high-level lifecycle states.
- Terminate pods programmatically and close HTTP resources cleanly.
Project Layout
src/geunduun/managers/: lifecycle management primitives.RunPodManagerimplements create, check, terminate, and wrapper build helpers.src/geunduun/docker_wrapper/runpod/: Dockerfile and wrapper script. The script captures logs, optionally reports status, and tears down pods when the wrapped workload exits.src/geunduun/enums.py: shared enums for standard status values.apps/: placeholder for application-specific workloads that will be launched on RunPod.
Requirements
- Python 3.11 or newer.
- Docker client available locally if you want to build wrapper images.
- RunPod API credentials (
RUNPOD_API_KEYfor workload pods,ROOT_RUNPOD_API_KEYfor administrative calls used by the wrapper script).
Installation
Clone the repository and install dependencies. You can use uv (recommended) or plain pip.
# using uv
uv sync
# using pip
python -m venv .venv
source .venv/bin/activate
pip install -e .
Usage
Build a wrapper image
The RunPodManager.build_wrapper helper wraps a base image with the Dockerfile in src/geunduun/docker_wrapper/runpod so the RunPod runtime can stream logs and clean up pods automatically.
from geunduun.managers.runpod import RunPodManager
manager = RunPodManager()
manager.build_wrapper("runpod/base:latest")
The command above produces a new image runpod/base:latest-runpod that can be referenced in your RunPod workload templates.
Launch and manage a pod
Set your RUNPOD_API_KEY environment variable, construct the API payload, and invoke the manager:
from geunduun.managers.runpod import RunPodManager
from geunduun.enums import InstanceStatus
manager = RunPodManager()
payload = {
"name": "example-worker",
"imageName": "runpod/base:latest-runpod",
"gpuTypeId": "H100",
"cloudType": "SECURE",
"env": {"MY_ENV_VAR": "value"},
"dataCenterId": "us-texas-1",
}
pod_id = manager.launch(payload)
status = manager.check(pod_id)
if status is InstanceStatus.RUNNING:
print("Pod is live!")
# When finished
manager.terminate(pod_id)
manager.close()
Refer to the RunPod pod launch API specification for all available payload fields.
Wrapper script environment
When the wrapper script runs inside the pod it respects:
LOG_DIR(default/workspace/logs): location for time-stamped combined stdout/stderr logs.ROOT_RUNPOD_API_KEY: bearer token for deleting the pod when the wrapped command exits.RUNPOD_POD_ID: pod identifier injected by RunPod.
Logs are captured under LOG_DIR/<YYYYMMDD_HHMMSS>.txt, and the pod is deleted after the wrapped workload finishes.
Development
- Format and lint using ruff:
uv run ruff check .(orpip install ruffand callruff check .). - Add integration tests or scripts under
apps/as needed. - The CLI entry point
geunduundeclared inpyproject.tomlis currently a placeholder; create amaincallable undergeunduun/__init__.py(or another module) before publishing to PyPI.
Roadmap
- Implement a higher-level orchestrator or CLI around
RunPodManager. - Add status reporting back to a central service from the wrapper script.
- Expand support for additional cloud backends beyond RunPod.
License
License information has not been specified yet.
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 geunduun-0.1.0.tar.gz.
File metadata
- Download URL: geunduun-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41e57abfec74c6003a81e35ee64e602303d50b8e62989b0cd00cb25597df5015
|
|
| MD5 |
a9e61eaa5c2ad435cafa6ee7b3596547
|
|
| BLAKE2b-256 |
76448c87374ffc07f027f1e9162fbdb3d652a82c5a17a3eee4886cf21c7b1f3c
|
File details
Details for the file geunduun-0.1.0-py3-none-any.whl.
File metadata
- Download URL: geunduun-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d98a3d4ef042621e959b6a59161535c8265a1e1d9967f1e797f5e1b3195f8401
|
|
| MD5 |
9a2bb5d1a29a87f67470ab78584fda29
|
|
| BLAKE2b-256 |
79e374477ee4126e35842f5f1e2e4983cf2b6a354e07323d34a6ea8429b01b0d
|