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 git+https://github.com/gautierdag/kblaunch.git
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-80GB-PCIe"
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-80GB-PCIe")--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
kblaunch-0.1.0.tar.gz
(75.1 kB
view details)
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.0.tar.gz.
File metadata
- Download URL: kblaunch-0.1.0.tar.gz
- Upload date:
- Size: 75.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fd2447851ce5735d8c954d560aea12a3aa1ec4c0d04d7768cce8c7cccd56529
|
|
| MD5 |
57f65ebaf92e9a35d9976ccb4fb2a246
|
|
| BLAKE2b-256 |
e3f490fad49ce493717e169474ed5c02aff9356dde4b729b8d500447f6b55c18
|
File details
Details for the file kblaunch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kblaunch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d698b60badb288c41e54d3ee293bcb29d8a546af156bbe973c0c9ca6c967173
|
|
| MD5 |
0818f2c3d244899658aeb2d0ac4b7513
|
|
| BLAKE2b-256 |
cb5ed1d6d2c0e80e552338a4bd7c692d3b0db4f0e7ece6e474a36ba4a0103c81
|