# Environment classes !!! abstract "Environment classes" * Environments are what is executing the code generated by the LM/agent. * We offer different classes for either executing code directly on the host machine, or in a container (e.g., Docker, Singularity, etc.). We support various environments for executing code through different backends. If you run the [`mini`](../usage/mini.md) CLI, you will run in the `local` environment by default. However, particularly for evaluating on SWE-bench, you want to run in isolated environments, so we offer multiple "backends" that you can use. You can specify the environment class with the `--environment-class` flag or the `environment.environment_class` key in the [agent config file](yaml_configuration.md). * **`local`** ([`LocalEnvironment`](../reference/environments/local.md)). Executes commands directly on the host machine using `subprocess.run`. No isolation. Directly works in your current python environment. * **`docker`** ([`DockerEnvironment`](../reference/environments/docker.md)). Executes commands with `docker exec`. * **`singularity`** ([`SingularityEnvironment`](../reference/environments/singularity.md)) - Executes commands in Singularity/Apptainer containers. Good alternative to Docker in HPC environments where Docker is not available. On top, there are a few more specialized environment classes that you can use: * **`swerex_docker`** ([`SwerexDockerEnvironment`](../reference/environments/swerex_docker.md)) - Docker execution through [SWE-ReX](https://github.com/swe-agent/swe-rex) * **`swerex_modal`** ([`SwerexModalEnvironment`](../reference/environments/swerex_modal.md)) - [Modal](https://modal.com) cloud execution through [SWE-ReX](https://github.com/swe-agent/swe-rex). Useful for training coding agents at scale with remote execution. * **`bubblewrap`** ([`BubblewrapEnvironment`](../reference/environments/bubblewrap.md)) - **Linux only**. Uses [bubblewrap](https://github.com/containers/bubblewrap) for lightweight, unprivileged sandboxing. Experimental.