Skip to main content

mimiry-serverless

Run Python functions on Mimiry GPUs. Installed by pip install mimiry, with mimiry-sdk.

from mimiry_serverless import function, Image

@function(gpu="RTX_48G_PCIe", image=Image.python().pip_install("torch"))
def matmul(n: int) -> float:
    import torch
    a = torch.rand(n, n, device="cuda")
    return float((a @ a).sum())

print(matmul.remote(4096))        # a new session, one call, the session ends
print(matmul.map([1024, 2048]))   # one session, every item through it
print(matmul.last_run)            # the session, its GPU, what it cost

run("nvidia-smi") runs a shell command and returns its exit code and output.

Sign-in is the mimiry command's: mimiry auth --key ~/.ssh/id_ed25519 once. The host is platform; nothing else is needed. configure(host=, key=) overrides both.

Choosing the machine

gpu (types, as mimiry availability lists them), family, min_vram (GB), gpu_count, location, max_rate (EUR per hour). With none of them: the cheapest GPU.

The image and Python

A function travels as a cloudpickle blob, which loads only on the Python version that sent it. The default image is Docker Hub's python:<your version>-slim; Image.python().pip_install(...) adds packages when the container starts. Another image must run your Python version: declare it with .python_version("3.12") and a mismatch is refused before anything is paid for.

A function defined in your script travels with its code. One imported from your own package travels by name, so the package must be in the image (or cloudpickle.register_pickle_by_value).

Results, and what is trusted

Loading a pickled result runs the code it names, and a result is written by whatever runs in the container. So a result loads only if every type in it is allowed:

  • always: plain data (numbers, strings, bytes, lists, dicts, tuples, sets, dates, decimals, UUIDs), NumPy arrays and Torch tensors (they arrive on the CPU);
  • the classes in the function's return annotation (-> Result), with a dataclass's field types;
  • the classes in result_types=[...].

Anything else is refused with ResultTypeRefused, naming the type. trust_results=True loads anything: use it only if you trust everything that runs in the container.

How it works

The session starts with a small command that installs nothing from the network but what the image asks for. The function, its arguments and the result travel only over SSH through the Mimiry gateway, with the session's host key checked: never in the session request, so the platform does not store them. Each call runs in a worker of its own, so a dropped connection does not lose it. The session ends after the call, or after 10 minutes without one.

Metadata

Release files for mimiry-serverless 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mimiry-serverless 0.8.0
File Interpreter ABI Platform Actions
mimiry_serverless-0.8.0-py3-none-any.whl Python 3 none any Details for mimiry_serverless-0.8.0-py3-none-any.whl

Release files / mimiry_serverless-0.8.0-py3-none-any.whl

Download URL mimiry_serverless-0.8.0-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1d203699257c7bd31692a6bdbdb408b86918dde113ddb9fd3616f544571c9ed
BLAKE2b-256 checksum
How to use checksums
ab98cfdc5e2a0c604cb16ac6e5621013b9804bc59048488231bf73314a9c1f99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for mimiry-serverless 0.8.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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for mimiry_serverless-0.8.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.8.0 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page