Skip to main content
Harbor supports multiple execution environment providers, allowing you to run agent evaluations locally or in the cloud with different resource configurations.

Environment Providers

Docker

Type: Local ExecutionGPU Support: Yes (with NVIDIA runtime)Network Isolation: YesDefault: YesRun evaluations in local Docker containers with full isolation and resource control.Key Features:
  • Local execution on your machine
  • Full Docker Compose support
  • GPU passthrough with NVIDIA runtime
  • Network isolation for security testing
  • Volume mounting for workspace access
  • Build caching for faster iteration

Daytona

Type: Cloud ExecutionGPU Support: YesNetwork Isolation: YesDefault: NoExecute evaluations in Daytona cloud sandboxes with on-demand scaling.Key Features:
  • Cloud-based execution
  • Automatic scaling
  • Snapshot support for faster startup
  • Custom resource allocation (CPU, memory, disk, GPU)
  • Managed cleanup and lifecycle
  • Session persistence

E2B

Type: Cloud ExecutionGPU Support: NoNetwork Isolation: NoDefault: NoRun evaluations in E2B cloud sandboxes with fast provisioning.Key Features:
  • Cloud-based sandboxes
  • Fast provisioning
  • Template-based environments
  • Automatic timeout handling
  • File upload/download
  • Pre-built Docker support

Modal

Type: Cloud ExecutionGPU Support: YesNetwork Isolation: YesDefault: NoExecute in Modal cloud sandboxes with GPU support and custom configurations.Key Features:
  • Serverless execution
  • GPU support with custom types
  • Network egress control
  • Custom CPU and memory allocation
  • Volume mounting
  • Secrets management

Runloop

Type: Cloud ExecutionGPU Support: NoNetwork Isolation: NoDefault: NoRun evaluations in Runloop cloud environments.Key Features:
  • Cloud-based execution
  • Managed infrastructure
  • API-based control

GKE

Type: Cloud Execution (Kubernetes)GPU Support: YesNetwork Isolation: YesDefault: NoExecute on Google Kubernetes Engine for enterprise-scale evaluations.Key Features:
  • Kubernetes-based orchestration
  • Enterprise-grade scaling
  • GPU support
  • Custom resource scheduling
  • Network policies

Feature Comparison

Usage

Docker (Default)

Docker is the default environment and requires no additional configuration:

Daytona Cloud

To use Daytona, set your API key and specify the environment:
Daytona-Specific Options:
  • Custom resources via environment config
  • Snapshot support for faster restarts
  • Automatic cleanup after trials

E2B Sandboxes

Configure E2B with your API key:
E2B-Specific Features:
  • Template-based provisioning
  • Fast startup times
  • Automatic timeout handling
Use Modal for GPU-accelerated evaluations:
Modal-Specific Options:
  • GPU types: A100, T4, A10G, etc.
  • Custom CPU/memory configurations
  • Network egress control

GKE (Kubernetes)

For enterprise deployments on Google Kubernetes Engine:

Environment Configuration

Each task can specify environment requirements in task.toml:

Resource Limits

Supported by: Daytona, Modal, GKE
Supported by: Daytona, Modal, GKE
Supported by: Docker (NVIDIA), Daytona, Modal, GKE
Supported by: Docker, Daytona, Modal, GKE

Environment Variables

Docker

  • DOCKER_HOST - Docker daemon socket
  • DOCKER_BUILDKIT - Enable BuildKit (recommended)

Daytona

  • DAYTONA_API_KEY - Authentication key (required)
  • DAYTONA_TARGET - Target deployment

E2B

  • E2B_API_KEY - Authentication key (required)
  • MODAL_TOKEN_ID - Token ID (required)
  • MODAL_TOKEN_SECRET - Token secret (required)

GKE

  • GOOGLE_APPLICATION_CREDENTIALS - Service account JSON path
  • GKE_PROJECT_ID - GCP project ID
  • GKE_CLUSTER_NAME - Kubernetes cluster name
  • GKE_ZONE - Cluster zone

Adding a New Environment

To add a custom environment provider:
  1. Create a new file in src/harbor/environments/{env_name}.py
  2. Extend BaseEnvironment
  3. Implement required methods:
    • start() - Start the environment
    • stop() - Stop and cleanup
    • exec() - Execute commands
    • upload() / download() - File operations
  4. Register in EnvironmentType enum
  5. Update environments/factory.py

Example Environment Implementation

See the environment development guide for detailed instructions.

Performance Considerations

Local vs Cloud

Use Docker when:
  • Developing and testing tasks locally
  • Running small-scale evaluations
  • Need immediate feedback
  • Have local GPU resources
Use Cloud when:
  • Running large-scale evaluations (100+ concurrent trials)
  • Need specific GPU types
  • Want automatic scaling
  • Require consistent environments across team

Cost Optimization

  1. Use snapshots (Daytona) for repeated evaluations
  2. Enable build caching to avoid rebuilding images
  3. Right-size resources - don’t over-provision CPU/memory
  4. Batch evaluations to amortize startup costs
  5. Clean up stopped environments promptly

Troubleshooting

  • Ensure Docker daemon is running
  • Check Dockerfile syntax
  • Verify base images are accessible
  • Enable BuildKit for better caching
  • Verify API keys are set correctly
  • Check key permissions and quotas
  • Ensure network access to provider APIs
  • Verify NVIDIA runtime is installed (Docker)
  • Check GPU availability in cloud provider
  • Confirm GPU type is supported
  • Check network isolation settings
  • Verify firewall rules
  • Confirm required ports are accessible