Skip to content

Compute Environments

OpenMLR supports multiple compute backends for code execution. Configure compute nodes in Settings > Compute to run experiments on local Docker containers, remote SSH servers, or Modal cloud sandboxes.

Overview

TypeDescriptionBest For
LocalDocker containers on your machineDevelopment, quick tests
SSHRemote servers via SSHGPU clusters, lab machines
ModalServerless cloud computeScalable GPU workloads

Local Compute

Executes commands in Docker containers on the host machine.

Configuration

FieldRequiredDescription
NameYesUnique identifier for this node
WorkspaceNoHost directory to mount (default: current directory)

How It Works

  1. Commands run inside a Docker container (python:3.12-slim by default)
  2. The workspace directory is mounted at /workspace in the container
  3. Results are captured and returned to the agent

Docker-in-Docker vs Direct Execution

When running OpenMLR in Docker Compose:

  • The worker container detects it's already inside a container
  • Commands execute directly in the worker container (no nested Docker)
  • File operations use the mounted workspace

When running natively:

  • Commands spawn isolated Docker containers
  • Each execution gets a fresh environment

SSH Compute

Execute commands on remote machines via SSH. Ideal for GPU clusters or dedicated lab machines.

Configuration

FieldRequiredDescription
NameYesUnique identifier
HostYesHostname or IP address
PortNoSSH port (default: 22)
UsernameYesSSH username
KeyYesSSH private key (managed in Settings > Compute > Keys)
WorkspaceNoRemote directory for file operations

SSH Key Management

  1. Go to Settings > Compute
  2. Click Manage Keys
  3. Generate a new Ed25519 or RSA key pair, or upload an existing key
  4. Copy the public key to your remote server's ~/.ssh/authorized_keys

Connection Pooling

SSH connections are pooled and reused across tool calls to minimize connection overhead. Idle connections are automatically cleaned up after 5 minutes.

Run code on Modal serverless infrastructure. Great for GPU workloads without managing infrastructure.

Configuration

FieldRequiredDescription
NameYesUnique identifier
GPUNoGPU type (T4, A10G, A100, etc.)
TimeoutNoMaximum execution time in seconds

Environment Variables

Set Modal credentials via environment variables or Settings > Providers:

bash
MODAL_TOKEN_ID=your-token-id
MODAL_TOKEN_SECRET=your-token-secret

GPU Options

GPUVRAMBest For
T416GBInference, small training
A10G24GBMedium training, fine-tuning
A10040/80GBLarge model training

Compute Tools

The agent has access to compute-related tools:

ToolModeDescription
compute_listPlan, ExecuteList available compute nodes
compute_probePlan, ExecuteProbe node capabilities (OS, GPU, Python versions)
compute_selectExecuteSwitch to a different compute node

Probing Capabilities

The compute_probe tool returns:

  • Operating system and architecture
  • Available GPUs with VRAM, CUDA version, driver version
  • Python versions installed
  • Available disk space

Example output:

OS: Linux x86_64 (Ubuntu 22.04)
GPUs:
  - NVIDIA A100-SXM4-80GB (80GB)
    CUDA: 12.4, Driver: 545.23.08
Python: 3.12, 3.11, 3.10
Disk: 850GB free

Setting a Default Node

  1. Go to Settings > Compute
  2. Click the star icon next to a node to set it as default
  3. New conversations will use this node for execution

Workspace Isolation

Each conversation gets its own workspace directory:

  • Local: workspaces/{conversation_uuid}/
  • SSH: {remote_workspace}/{conversation_uuid}/
  • Modal: Ephemeral filesystem per execution

Files created during execution persist within the conversation but are isolated from other conversations.

Security Considerations

  • Local: Commands run in Docker containers with limited host access
  • SSH: Use dedicated keys with restricted permissions; consider a separate user for OpenMLR
  • Modal: Code runs in isolated serverless containers

WARNING

Never expose compute nodes with unrestricted access. Use SSH keys without passphrases only in trusted environments.