VMs with 100 CPUsVirtual CPUs: each is one processor core a machine can run on at the same moment, so 100 of them run 100 programs in parallel, alongside 256 GiB of memory and 1 PiB of storage. charged by usageThe meter counts the CPU, memory and disk a machine actually touched. An idle machine costs almost nothing; a stopped one bills only its disk..

Persistent by default, with 256 GiB of memory and 1 PiB of storage on every machine. No sizes to pick.

claude.ai / New chat

What shall we build?

Sonnet 5.5
import { ix } from "@indexable/sdk"

const machine = await ix.machines.create({})
const { stdout } = await machine.exec("nproc")

console.log(`${stdout.trim()} vCPUs`)
use ix_sdk::{CreateTarget, CreateVm, IxClient};

#[tokio::main]
async fn main() -> eyre::Result<()> {
    let ix = IxClient::from_env()?;
    let spec = CreateVm::new(CreateTarget::Image("ix/debian:12".to_owned()));
    let vm = ix.create_vm_from_target(spec).await?.branch;
    let out = vm
        .exec_checked(vec!["nproc".into()], None)
        .await?;
    let cpus: u32 = out.stdout.trim().parse()?;

    println!("{cpus} vCPUs");
    Ok(())
}
esc
  • Loading