cpuos

Base profile

Python sandbox template

Plan a Python sandbox for code interpreters, pandas analysis and matplotlib charts, with bounded input, useful artifacts and explicit resource limits.

When to use this profile

Use Python when an agent needs to turn a supplied dataset into an answer. Upload a CSV, let the agent write a small script, then return a compact statistical summary and the chart that supports it. Keep the model outside the sandbox; the interpreter needs CPU and memory, not a second model runtime.

Prepare a repeatable environment

  • Pin Python and package versions in a reproducible environment; record the lockfile with the analysis.
  • Place inputs under /work/input and outputs under /work/output. Give each task its own directory.
  • Read a sample before loading an entire dataset. Select columns and explicit dtypes to control pandas memory use.
Command inside a prepared Linux guest
python /work/analysis.py

Return results the agent can use

  • A JSON result with counts, units and missing-value handling.
  • PNG or SVG charts plus the generated source script.
  • Bounded stdout, stderr and the process exit code.

Run a known fixture with missing values and assert the totals. Save the chart, verify its dimensions, and repeat with a failing script to ensure errors reach the agent.

Resources and boundaries

Start with 2 vCPU and 4 GB of RAM, then measure peak memory and task duration on a representative fixture. These are workload planning values, not a benchmark or a provisioned configuration. Use the sandbox cost calculator to estimate running time and retained snapshots.

  • A 4 GB starting profile does not mean a 4 GB CSV will fit; parsing and copies require additional memory.
  • Reject arbitrary pickle files and executable input formats.
  • Allow package downloads only during preparation, then remove network access for offline analysis.

Keep model inference separate from this execution profile. A hosted model or gpuOS can decide the next action while the CPU environment runs it. The quickstart describes the account workflow and the proposed runtime contract.

Questions

Is this a separate built-in template?
This page documents the python base profile shown in the cpuOS product catalog. Runtime provisioning requires a connected execution service; creating an account does not provision a microVM.
Can I run the command now?
The command runs in a Linux environment where the listed dependencies and input files are prepared. cpuOS SDK examples describe a proposed contract; confirm runtime access and package versions before integration.
How should I choose CPU and memory?
Use the starting profile to run a representative fixture, measure peak memory and elapsed time, and add room for package installation, worker processes and larger inputs. Enforce a task timeout separately.

Related guides

Plan your python task

Create a workspace and choose a profile. Connect an execution backend before running code.

gpuOS · where models think

Need the model too? Run it on gpuOS

gpuOS serves open models on your own GPUs behind one OpenAI-compatible API. The model reasons on gpuOS, the agent acts in a cpuOS sandbox.