A CLI tool for launching Kubernetes jobs in EIDF
Project description
kblaunch
A CLI tool for launching Kubernetes jobs with environment variable and secret management.
Installation
pip install kblaunch
Or using uv:
uv add kblaunch
You can even use uvx to use the cli without installing it:
uvx kblaunch --help
Usage
Basic Usage
Launch a simple job:
kblaunch \
--email your.email@ed.ac.uk \
--job-name myjob \
--command "python script.py"
With Environment Variables
-
From local environment:
kblaunch \ --job-name myjob \ --command "python script.py" \ --local-env-vars PATH \ --local-env-vars PYTHONPATH
-
From Kubernetes secrets:
kblaunch \ --job-name myjob \ --command "python script.py" \ --secrets-env-vars mysecret1 \ --secrets-env-vars mysecret2
-
From .env file:
kblaunch \ --job-name myjob \ --command "python script.py" \ --load-dotenv
GPU Jobs
Specify GPU requirements:
kblaunch \
--job-name gpu-job \
--command "python train.py" \
--gpu-limit 2 \
--gpu-product "NVIDIA-A100-SXM4-80GB"
Interactive Mode
Launch an interactive job:
kblaunch \
--job-name interactive \
--interactive
Options
--email: User email [required]--job-name: Name of the Kubernetes job [required]--docker-image: Docker image (default: "nvcr.io/nvidia/cuda:12.0.0-devel-ubuntu22.04")--namespace: Kubernetes namespace (default: "informatics")--queue-name: Kueue queue name--interactive: Run in interactive mode (default: False)--command: Command to run in the container [required]--cpu-request: CPU request (default: "1")--ram-request: RAM request (default: "8Gi")--gpu-limit: GPU limit (default: 1)--gpu-product: GPU product (default: "NVIDIA-A100-SXM4-80GB")--secrets-env-vars: List of secret environment variables--local-env-vars: List of local environment variables--load-dotenv: Load environment variables from .env file (default: True)
Features
- Kubernetes job management
- Environment variable handling from multiple sources
- Kubernetes secrets integration
- GPU job support
- Interactive mode
- Automatic job cleanup
- Slack notifications (when configured)
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 kblaunch-0.1.8.tar.gz.
File metadata
- Download URL: kblaunch-0.1.8.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
785e697c7956a5a70afb0ca0bb033a84461a032191846a16dfaec8e562d5d054
|
|
| MD5 |
74fa12e9066d62057e554dace9c9737b
|
|
| BLAKE2b-256 |
ccb339293d562f9ffe4853bc2db09ab6370d981ffd06a62388c62c6c40de5356
|
File details
Details for the file kblaunch-0.1.8-py3-none-any.whl.
File metadata
- Download URL: kblaunch-0.1.8-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76ef4ed6ed49107b33d5ffa56130733c7a2249b5c6f5f2c269d91ff427b748ed
|
|
| MD5 |
dd10c6bc08a33713991b18795a039382
|
|
| BLAKE2b-256 |
f5da3c0d0f68b96e0102eea926e9e676a3795a513c7616022b451172e460a14f
|