Запуск изолированного кода в удалённых контейнерах Modal, в том числе с GPU.

Звёзды390
Форки42
АвторBlockRunAI
Обновлённоя 12 2026

Установка

SKILL.md

Modal Sandboxes

Disposable remote containers (with optional GPU) via Modal, paid per call in USDC. No Modal account, no GPU procurement.

READ THIS BEFORE SETTING timeout

timeout is the BILLED lifetime, charged upfront in full, and never refunded — not an idle timeout. Above 300s the price switches from a flat rate to per-hour billing for the entire duration you ask for, whether you use it or not. Terminating early refunds nothing.

That makes timeout the single most expensive field in this MCP:

what you ask forwhat you pay
{ timeout: 300 }$0.0120
{ timeout: 300, gpu: "A100" }$0.2020
{ timeout: 600, gpu: "A100" }$0.6687
{ timeout: 86400, gpu: "H100" }$192.0020

All four are live-verified quotes. A 24h H100 sandbox costs $192 upfront, non-refundable, even if your job finishes in a minute.

So: ask for the time you need, not a safe-looking ceiling. Need 20 minutes of H100? timeout: 1200 is $2.67, not $192. Keep timeout ≤ 300 and you stay on the flat rate entirely.

How to Call from MCP

// 1. Create — timeout: 300 keeps you on the FLAT rate ($0.0120, or $0.2020 with A100).
//    Anything above 300 bills hourly for the full requested lifetime, no refund.
blockrun_modal({ path: "sandbox/create", body: {
  image: "python:3.11",
  gpu: "A100",
  timeout: 300,
  setup_commands: ["pip install torch transformers"]
}})
// returns { sandbox_id, ... }

// 2. Exec
blockrun_modal({ path: "sandbox/exec", body: {
  sandbox_id: "sb_abc...",
  command: ["python", "-c", "import torch; print(torch.cuda.get_device_name(0))"]
}})

// 3. Terminate
blockrun_modal({ path: "sandbox/terminate", body: { sandbox_id: "sb_abc..." } })

Endpoint Catalog

PathMethodBodyPrice
sandbox/createPOST{ image?, timeout?, cpu?, memory?, gpu?, setup_commands? }depends on timeout + gpu — see below
sandbox/execPOST{ sandbox_id, command: ["python","-c","..."], timeout? }$0.0030
sandbox/statusPOST{ sandbox_id }$0.0030
sandbox/terminatePOST{ sandbox_id }$0.0030

sandbox/create pricing is bimodal

timeout ≤ 300s — flat rate, charged once:

gpuprice
(none, CPU)$0.0120
T4$0.0520
L4$0.0820
A10G$0.1020
A100$0.2020
H100$0.4020

timeout > 300s — per-hour × the full requested lifetime, upfront, no refund:

gpuper hour1h24h (max)
(none, CPU)$0.10$0.1020$2.4020
T4$1.50$1.5020$36.0020
L4$2.00$2.0020$48.0020
A10G$2.50$2.5020$60.0020
A100$4.00$4.0020$96.0020
H100$8.00$8.0020$192.0020

Hours are exact, not rounded up — timeout: 1800 on A100 is 0.5h = $2.0020. Every figure above includes the $0.002 flat transaction fee. Max timeout is 86400 (24h).

One quirk worth knowing: timeout: 300 costs $0.0120 (flat) but timeout: 301 costs $0.0104 (CPU-hourly) — just past the cliff is briefly cheaper on CPU. It stops being cheaper around 432s.

Field Reference

FieldDefaultNotes
imagepython:3.11Any public Docker image. nvidia/cuda:12-runtime if you bring GPU code.
timeout300BILLED lifetime in seconds — charged upfront for the full amount, never refunded. NOT idle eviction: you pay for what you ask for, not what you use. ≤300 = flat rate; >300 switches to per-hour billing (see the tables above). Max 86400 (24h). This is the field that turns a $0.01 sandbox into a $192 one.
cpu1CPU cores
memory1024Memory in MB
gpunoneT4 / L4 / A10G / A100 / H100 — those five only. Anything else is rejected: {"gpu":"A100-80GB"} returns HTTP 400 "Unsupported GPU type. Allowed: T4, L4, A10G, A100, H100". Drives the price hard — see the tables above.
setup_commands[]Shell commands run once during sandbox provisioning
command (exec)requiredArray form: ["python","-c","print(2+2)"]

Worked Examples

1. Quick Python eval

const { structuredContent: sb } = await blockrun_modal({ path: "sandbox/create", body: {} })
await blockrun_modal({ path: "sandbox/exec", body: {
  sandbox_id: sb.sandbox_id,
  command: ["python", "-c", "import numpy; print(numpy.__version__)"]
}})
await blockrun_modal({ path: "sandbox/terminate", body: { sandbox_id: sb.sandbox_id } })

Cost: $0.0180 — create $0.0120 + exec $0.0030 + terminate $0.0030. Every call carries the $0.002 transaction fee, so three calls pay it three times; batch your work into one exec rather than several.

2. GPU inference, A100, with deps pre-installed

blockrun_modal({ path: "sandbox/create", body: {
  image: "pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime",
  gpu: "A100",
  timeout: 1200,
  memory: 16384,
  setup_commands: ["pip install --quiet transformers accelerate"]
}})

Then sandbox/exec with your inference command.

Cost: $1.3413 — create $1.3353 + exec $0.0030 + terminate $0.0030. timeout: 1200 is above the 300s flat tier, so the A100 bills hourly for the full 20 minutes you asked for: $4.00/h × (1200/3600) = $1.3333, + the $0.002 fee. It is charged upfront and never refunded — it does NOT auto-evict when idle, and terminating after 30 seconds still costs the full $1.3353. Ask for the time you actually need.

3. Test untrusted code Claude generated

blockrun_modal({ path: "sandbox/exec", body: {
  sandbox_id,
  command: ["bash", "-c", "<the generated script>"],
  timeout: 60
}})

Output is captured. No risk to your local machine.

When NOT to Use Modal

  • Normal repo edits / dev work — use local tools, Modal adds latency and cost
  • Long-running services — sandboxes are ephemeral, not server hosts
  • Anything you'd run hundreds of times per minute — payment overhead dominates at high QPS

Notes

  • sandbox_id is returned by create and required by every other endpoint
  • exec is sync — blocks until command finishes or hits its timeout
  • terminate is cheap; call it to free the sandbox even if timeout would expire shortly
  • The free-tier nvidia/* LLM models in blockrun_chat are different infrastructure — Modal is for your arbitrary code

Reference

  • Endpoints: POST /v1/modal/sandbox/{create,exec,status,terminate}
  • Upstream: Modal

Вставить в README

Ссылка на карточку для вашего README — без картинок и счётчиков.

[DarkPlay: modal](https://darkplay.ru/ai/skills/blockrunai-blockrun-mcp-modal)

Похожие скиллы и другие разделы каталога

Популярное в разделе «Скиллы»

Самые востребованные скиллов раздела по установкам и звёздам.

find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
4 400 000 устан.
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
1 600 000 устан.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
1 600 000 устан.
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
1 600 000 устан.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
1 600 000 устан.
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
1 500 000 устан.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
1 400 000 устан.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
1 300 000 устан.
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
1 300 000 устан.
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.
1 300 000 устан.
Похожее в других разделах каталога

Соседние разделы каталога: возможно, нужный инструмент живёт там.

pixeltableanthropics · Создание мультимодальных AI-приложений с Pixeltable — таблицы, вычисляемые столбцы, поиск…
100 комп.
pixeltableanthropics · Создание мультимодальных AI-приложений с Pixeltable: таблицы, вычисляемые столбцы, поиск…
233 комп.
infrastructureorchestra-research · Облачные GPU и оркестрация вычислений: Modal, Lambda Labs и SkyPilot. Используйте при…
96 комп.
multimodalorchestra-research · Модели для зрения, аудио и мультимодальных задач: CLIP, Whisper, LLaVA, BLIP-2, Segment…
96 комп.
minimax-skillsminimax-ai · Библиотека навыков MiniMax AI для фронтенда, фулстека, Android, iOS, шейдеров…
17 комп.
daftanthropics · Навыки работы с Daft — высокопроизводительным движком данных для ИИ и мультимодальных…
38 комп.
gemini-plugin-ccanthropics · Плагин gemini-plugin-cc для Claude Code: ревью кода, делегирование задач и…
38 комп.
phasefolioanthropics · Моделирование rNPV и due diligence биотех-активов в Claude Code на основе данных…
38 комп.
rs-dl-architectanthropics · rs-dl-architect — экспертное руководство по проектированию, анализу и ревью архитекту�…
38 комп.
video-to-code-skillanthropics · Загружает видео в контекст Claude как транскрипцию и сводку, синхронизированные с…
38 комп.

Лучшие ИИ-инструменты для программирования

ИИ для программирования

Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные

GenAPIGenapi
По запросу
5.0
Notepad++ AINotepad-plus-plus
По запросу
4.9
GitHub CopilotGitHub
По подписке
4.9
Creatium MaxCremax
По запросу
4.8
Emacs AIGnu
По запросу
4.8
KiteKite
По запросу
4.8
Amazon Q DeveloperAmazon
По запросу
4.8
VECTA
Есть бесплатный тариф
4.8
SoftPractice
Есть бесплатный тариф
4.8
VibeForge
Есть бесплатный тариф
4.7

Лучшие ИИ-инструменты для генерации видео

Генерация видео

Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,

VEED.IOVeed
По запросу
5.0
MootionMootion
По запросу
5.0
FlyviFlyvi
Есть бесплатный тариф
4.9
Google Veo 3.1Google
Платно
4.9
Sora (OpenAI)OpenAI
Платно
4.9
PikaPika
Платно
4.9
captions space
Есть бесплатный тариф
4.8
Клайп
Есть бесплатный тариф
4.8
viralpulse.appViralpulse
По запросу
4.8
Viral Maker AIViral-maker
Есть бесплатный тариф
4.8

Лучшие ИИ-инструменты для генерации текста и копирайтинга

Генерация текста и копирайтинг

Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра

NeuroscribeNeuroscribe
Есть бесплатный тариф
5.0
GoGPTGogpt
По запросу
5.0
ChatsonicChatsonic
По запросу
4.9
НейроТекстерNeuro-texter
По запросу
4.9
ChatGPTOpenAI
По подписке
4.9
Редактум
Есть бесплатный тариф
4.8
ChadGPTChadgpt
По запросу
4.8
Cosmo ScribeCosmoscribe
Есть бесплатный тариф
4.8
Memo HelperCopilot33
По запросу
4.8
LibraChatLibrachat
Есть бесплатный тариф
4.8