Mimiry

Get Your First Function Running on a GPU.

Three steps, five minutes of your time. Most of that is waiting for pip install; the GPU takes a few minutes more to arrive. You'll need an SSH key and Python 3.10, the version inside the default image: your function ships as-is and runs on the Python it finds there.

~5 minread & runPython 3.10matches the imageSSHauthSDK v0.4

Register Your SSH Key

Mimiry uses an SSH key to authenticate every API call. There's no browser sign-in, no API token to paste. If you don't already have a key for Mimiry, generate one:

BASH
ssh-keygen -t ed25519 -f ~/.ssh/mimiry -C "mimiry"

Sign in to the platform manager and add the public half (~/.ssh/mimiry.pub):

Platform manageralpha.mimiry.com · Profile → SSH keys → Add key

Then point the SDK at your private key:

BASH
export MIMIRY_SSH_KEY=~/.ssh/mimiry
Add it to your shell profile (~/.zshrc, ~/.bashrc) so it sticks across new terminals.

Install the SDK

BASH
pip install mimiry

This brings in the mimiry Python library and a small mimiry CLI. Check that your key works:

BASH
mimiry balance
expected output
OUTPUT
{
  "account_type": "user",
  "balance": 20.0,
  "available": 20.0,
  "currency": "EUR",
  "total_spent": 0.0,
  "active_sessions": 0
}

You should see a JSON snippet with your account balance in EUR. If you do, you're authenticated.

Then see what is on the floor right now:

BASH
mimiry availability
expected output
OUTPUT
A100_80G_SXM   80 GB   verda   FIN-01, FIN-02, FIN-03   €1.85/h
H100_80G_SXM   80 GB   verda   FIN-01, FIN-02           €3.36/h
H200_141G_SXM  141 GB  verda   FIN-02, FIN-03           €4.13/h

GPUs, locations, and hourly rates, live (the real output is JSON; this is the shape). Availability changes through the day, sometimes within minutes; this is the catalog your session is scheduled against. A family name like A100 is enough: the SDK sends every size that is available, cheapest first, and the platform picks.

Run Your First Function

Save this as hello_gpu.py:

PYTHONhello_gpu.py
import mimiry

@mimiry.function()          # defaults: an A100, nvcr.io/nvidia/pytorch:24.01-py3
def gpu_info() -> str:
    """Return whatever nvidia-smi sees on the GPU."""
    import subprocess
    return subprocess.check_output(
        ["nvidia-smi", "--query-gpu=name,memory.total",
         "--format=csv,noheader"],
        text=True,
    ).strip()

if __name__ == "__main__":
    print(gpu_info.remote())

Then run it:

BASH
python hello_gpu.py

The SDK narrates on stderr while the machine comes up. Provisioning takes about a minute, boot another one or two, and pulling the image three to five: the image is most of the wait, and your function runs in under a second once it is there.

OUTPUT
[mimiry] session a2ac3118-… submitted
[mimiry] state=provisioned
[mimiry] state=pulling_image
[mimiry] state=running
[mimiry] fetching result
[mimiry] session a2ac3118-…: A100_40G_SXM for 478s, cost 0.2219 EUR
expected output
OUTPUT
NVIDIA A100-SXM4-40GB, 40960 MiB

Every call leaves the bill on the function. Sessions are charged in ten-minute blocks, so a first run like this one costs one block at the GPU's hourly rate:

PYTHON
print(gpu_info.last_run.final_cost)   # 0.221751
print(gpu_info.last_run.phases)       # {'provisioned': 52.1, 'pulling_image': 174.9, 'running': 472.3}
If the run is refused before anything is created, read the message: the SDK checks your Python version against the image, the GPU against the catalog, and a volume against its location, and says which one did not match. A refusal costs nothing.
Success

That's It. Welcome to Mimiry.

That was your Python, on an A100, in one command.

Where to go next

Three small things to try once your first function works.

Raw bash with mimiry.run

Shell commands on a GPU, with stdout and stderr returned as a Python string.

/docs/run

Pick a different GPU

mimiry availability shows what is on the floor, then gpu="H100" on the decorator. A family name is enough; the SDK picks the cheapest size that is free.

/docs/gpus

Keep data between runs

Create a volume once with mimiry volume create, attach it with volume="name" on the decorator, and write to /data. The next session finds it there.

/docs/volumes