Python SDK for serverless compute
Project description
mimiry — Python SDK for Mimiry GPU compute
Status: alpha — early access Backend: softlaunch.mimiry.com (beta)
Python-native interface for running serverless cloud GPU jobs on Mimiry, with full control over locality and providers.
Install
pip install mimiry
Or, for local development from a clone of this repo (editable install):
pip install -e .
Auth
Running jobs requires a Mimiry account. The SDK authenticates with SSH-JWT — the same SSH key you register on your account at the Mimiry portal. The fastest way to get set up is the interactive wizard, which generates a key (if needed), walks you through registering it in the portal, writes MIMIRY_SSH_KEY to your shell profile, and verifies the connection:
mimiry setup # alias: mimiry init
This is a one-time step — you're set going forward.
To configure auth manually instead, point the SDK at your private key:
export MIMIRY_SSH_KEY=~/.ssh/mimiry
Or pass ssh_key_path= explicitly to mimiry.configure().
GPU types and providers
Mimiry sources GPUs from both local datacenters and cloud providers across Europe and the US, spanning entry-level cards up to the latest high-end accelerators. You control locality and hardware requirements, as well as which providers to use.
Always check what's currently available before selecting hardware:
mimiry availability
To filter to a single GPU family, add --gpu-family <FAMILY>.
Python version
Your local Python major.minor must match the Python inside your container
image. The SDK ships your function to the GPU with cloudpickle, which can't
move code objects across Python versions — e.g. a function pickled on 3.12
won't load on 3.10.
You don't need to think about this with the default image: it ships Python
3.12, matching recent Ubuntu / Debian / Fedora. It only matters if you set
image= yourself — pick one whose python3 matches your local interpreter.
Confirm with python3 --version locally and inside the image; a mismatch
shows up as a failure to deserialize your function.
Quickstart — one-shot function
import mimiry
@mimiry.function(
# Uses default hardware; run `mimiry availability` to choose a GPU/provider.
image="nvcr.io/nvidia/cuda:12.6.2-runtime-ubuntu24.04",
)
def gpu_info():
import subprocess
return subprocess.check_output(
["nvidia-smi", "--query-gpu=name,memory.total", "--format=csv"],
text=True,
)
print(gpu_info.remote())
Quickstart — raw bash command
import mimiry
result = mimiry.run(
image="nvcr.io/nvidia/cuda:12.6.2-runtime-ubuntu24.04",
command="nvidia-smi",
)
print(result.logs)
What works in this version
@mimiry.function(gpu=..., image=...)decorator.remote(*args, **kwargs)— sync call, returns the function's return value.map(iterable)— runs the function over an iterable, sequentiallyImage.from_registry(uri).pip_install(...).apt_install(...)— basic image customisation (installs at container start; no real Dockerfile build)mimiry.run(image, gpu, command)— raw bash entrypoint- SSH-JWT auth via existing key
Examples
See examples/:
01_hello.py— minimalnvidia-smion a GPU02_cuda_probe.py— probe the GPU (driver, CUDA, device count) and return a structured Python dict03_bash_command.py— run an arbitrary shell command withmimiry.run()
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 mimiry-0.2.1.tar.gz.
File metadata
- Download URL: mimiry-0.2.1.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b82ac3511a58f60889fe22b108f6a8280e0208b00aae3ef9ceb795a4b030177d
|
|
| MD5 |
8e6c78ab6940d53d455ae044f01ff012
|
|
| BLAKE2b-256 |
a5f2aca34856977b8fa67b05f24a7f1c5cc6a7531ca5d46d86a6a9504c88fc56
|
File details
Details for the file mimiry-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mimiry-0.2.1-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78687e1ea6ba4aeeca4b2769e300cdc4891979b33493d1e5574d5e37dd5599e9
|
|
| MD5 |
49dc3b06166cd317b7b35a17dc5c15cf
|
|
| BLAKE2b-256 |
73ec3da862c21a3b1f2b26b9deb008aeca6c28b80c3d2c5407b0ade768cf56ac
|