Skip to content

Tasks

A task runs a Python script once, to completion, on a node matched to the hardware you pick. You submit the code, an image, and the hardware — Meshive schedules it, streams the logs live, uploads whatever the script writes to /outputs, and charges your prepaid credit only for the time the container actually ran.

Script (main.py + optional requirements.txt)
│ Submit — image + hardware + max run time
Runs on a matched node ──▶ logs stream live in the console
│ script exits (or hits max run time)
Files in /outputs uploaded ──▶ download from the console

Everything lives under Serverless › Tasks in your workspace console.

Serving keeps a model resident behind an always-on endpoint. Tasks run a script and stop.

ServingTasks
What runsA model behind an OpenAI-compatible endpointYour Python script, once
LifetimeUntil you pause or delete itUntil the script exits (or max run time)
You get backAPI responsesLive logs + files from /outputs
BillingGPU-hour × running replicasRuntime of the container, from prepaid credit

Typical task workloads: batch inference over a dataset, fine-tuning a model, data preprocessing — anything with a start and an end.

  1. Open Serverless › Tasks in your workspace console and click New task.

  2. Name the task.

  3. Add your script — write it in the code editor, or upload main.py plus an optional requirements.txt (see below).

  4. Pick an image — an official template, or your own image from a custom registry (see Container images).

  5. Pick hardware — a GPU model and count, or a CPU-only preset:

    PresetvCPURAM
    Standard832 GB
    High-mem16128 GB
  6. Environment variables & secrets (optional) — available to your script as regular env vars.

  7. Max run time — 1 to 24 hours. The task is stopped when it hits this ceiling (see Task billing & refunds).

  8. Webhook (optional) — get a signed POST when the task finishes (see Webhooks).

  9. Submit. The task card shows the live status, streaming logs, and Cost so far.

You can Stop a running task at any time — you’re charged for the time it actually ran, and no webhook event is sent for a manual stop.

If you attach a requirements.txt, pip install -r requirements.txt runs inside the container, before your script starts.

SourceRequirements
Official templateNone — guaranteed to work with tasks out of the box
Custom registry imageMust have python (with pip, if you use requirements.txt) on the PATH

A custom image without a working python fails at startup — that’s a user fault and is charged like any other user-code failure. Test the image locally first: docker run --rm <image> python --version.

Private registries use the registry credentials already connected to your workspace — the same ones used for custom pod templates.

Your script starts with /outputs as its working directory. Anything it writes there is uploaded automatically after the container exits and becomes downloadable from the task’s page in the console.

  • Relative writes (open("result.csv", "w")) already land in /outputs — no path handling needed.
  • _task.log is added automatically: a tail of the run’s log, archived alongside your files.
  • Files are kept per the platform’s retention policy — download anything you want to keep long-term.
Output limitValue
Max size per file5 GiB
Max number of files200
Output disk budget20 GiB

Add a webhook to be notified when a task reaches a terminal state:

EventWhen
task.succeededScript exited with code 0
task.failedScript failed — non-zero exit, OOM, eviction, install failure, or a platform fault
task.timed_outMax run time reached

Terminal states only. A manual Stop sends no event.

The payload envelope matches inference webhooks:

{
"id": "evt_3f9c1a2b4d5e6f70",
"type": "task.succeeded",
"created_at": 1780000000,
"data": {
"id": "task_abc123",
"name": "nightly-batch-embed",
"status": "succeeded",
"fault_class": "none",
"exit_code": 0,
"failure_reason": null,
"namespace_name": "my-workspace",
"gpu_model": "RTX 4090",
"created_at": 1779996400,
"finished_at": 1779999998,
"total_cost": "0.42000000"
}
}
  • fault_classnone (succeeded), user, or platform. This is what decides whether anything is refunded.
  • total_cost — the final, trued-up charge in credit.

Deliveries carry the same X-Meshive-Signature HMAC header as every other Meshive webhook — verify it exactly as described in Webhooks → Verifying the signature. Retries, idempotency (dedupe on the event id), and security rules are also identical.

LimitValue
Max run time1 – 24 hours
Script + requirements.txt size~960 KiB combined
Environment variablesUp to 64, ~32 KiB total
GPUs per taskUp to 8
Concurrent tasksNo cap — every task is paid
Output files5 GiB / file · 200 files · 20 GiB total