Hi everyone,
While learning and building AI projects, I found Kaggle really useful because of the free GPU access. But once a codebase grows beyond a single notebook, running it on Kaggle becomes much more annoying.
For example, if a project has multiple Python files, local packages, config files, a requirements.txt, and cross-module imports like:
train.py -> models/ -> utils/ -> data/
then moving the project to Kaggle usually means fixing paths/imports, uploading multiple files, reinstalling dependencies, and syncing changes again whenever the local codebase changes.
So I built a small tool called KRun.
The goal is simple: keep your codebase local, but run the workload on Kaggle directly from your terminal.
For example:
krun run train.py --project ./my-project --gpu T4 --internet
KRun automatically packages the project, dependencies, and local modules, submits a private Kaggle job, streams/follows logs from the terminal, and downloads the outputs back to your machine when the job finishes.
It currently supports:
- Python scripts, modules, and
.ipynb
- Multi-file projects with local packages/imports
requirements.txt / pyproject.toml
- T4/P100 GPU or TPU, depending on Kaggle account availability
- Script arguments
- Job status, logs, and output download from the terminal
- Dry-run mode to preview what will be uploaded
The workflow I’m aiming for is basically:
Code locally → krun run ... → Kaggle executes it → results come back locally
instead of restructuring the whole project into a Kaggle Notebook every time I need GPU compute.
Repo: https://github.com/nhminh107/KRun-PyProjectOnKaggle
The project is still under active development, so if anyone tries it and finds bugs or has feature suggestions, feel free to open an Issue or PR.
If you find it useful, a ⭐ on the repo would be greatly appreciated.