Sandboxes#
Sandbox environments for isolated task execution.
Podman Sandbox#
Simple Podman sandbox environment for inspect_ai.
This module provides a minimal PodmanSandboxEnvironment that uses the Podman CLI directly (not podman-compose) for running containers.
- class dash_evals.runner.sandboxes.podman.podman.PodmanSandboxEnvironment[source]#
Bases:
SandboxEnvironmentSimple Podman-based sandbox environment.
- classmethod config_files()[source]#
Standard config files for this provider (used for automatic discovery)
- classmethod default_concurrency()[source]#
Default max_sandboxes for this provider (None means no maximum)
- async classmethod sample_init(task_name, config, metadata)[source]#
Start a container for this sample.
- async classmethod sample_cleanup(task_name, config, environments, interrupted)[source]#
Stop and remove containers.
- async classmethod task_cleanup(task_name, config, cleanup)[source]#
No task-level cleanup needed - containers are removed per-sample.
- async exec(cmd, input=None, cwd=None, env=None, user=None, timeout=None, timeout_retry=True, concurrency=True, truncate=True)[source]#
Execute command inside the container.
- async read_file(file, text=True)[source]#
- Overloads:
self, file (str), text (Literal[True]) → str
self, file (str), text (Literal[False]) → bytes
- Parameters:
- Return type:
Read file from container.