mcr — Modal CUDA Runner
Run a CUDA .cu file on an NVIDIA GPU from Modal, from anywhere on your machine, in one command. No local GPU required.
Install
pip install git+https://github.com/<your-handle>/modal-cuda-runner
modal setup # one-time Modal authentication
Usage
$ mcr test.cu
→ Running test.cu on T4
GPU: Tesla T4
Vector length: 1048576
Errors: 0
Sample: c[0]=3.0 c[1048575]=3.0
✓ Finished executing on Modal (3.42s)
Pick a different GPU with --gpu:
mcr test.cu --gpu H100
Supported: T4 (default), L4, A10G, A100, A100-80GB, H100.
The CUDA program's stdout is forwarded to your stdout and its exit code becomes mcr's exit code, so mcr composes cleanly with shell pipes and CI.
How it works
mcr reads your .cu file locally and sends the source as a function argument to a Modal function running an nvidia/cuda:12.9.0-devel-ubuntu22.04 image. Because the image never changes across invocations, Modal caches it forever — no per-run image rebuild.
On the remote container: nvcc compiles the source, then the resulting binary runs on the requested GPU. stdout streams back as it's produced.
- First run: slower — container cold start on Modal's side.
- Subsequent runs: typically a few seconds for small kernels.
Not yet supported
Intentionally scoped small for v1:
- Multi-file projects /
.cuhheaders - Passing CLI args or stdin to the CUDA binary
- Custom
nvccflags
Metadata
Release files for modal-cuda-runner 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modal_cuda_runner-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for modal_cuda_runner-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modal_cuda_runner-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for modal_cuda_runner-0.1.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / modal_cuda_runner-0.1.0.tar.gz
| Download URL | modal_cuda_runner-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
740eaef9197ccb2d259dd010a3f857e1c1b07dc907132041894afd164a9325cf
|
|
BLAKE2b-256 checksum How to use checksums |
b3e1d66e67cf6b8e39790e226d4d62b6e0af79bf6114b1f947583611d81f85be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / modal_cuda_runner-0.1.0-py3-none-any.whl
| Download URL | modal_cuda_runner-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18e6934555cbdc2e01274cd5f24669f7c990e179a38202bfb8b9bbee0ec5c3c5
|
|
BLAKE2b-256 checksum How to use checksums |
f607b8de87d284341643c129048682b99413941d7c98ae1ad5d62c8d8d5c339d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for modal-cuda-runner 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.