> ## Documentation Index
> Fetch the complete documentation index at: https://opencompass-docs-preview-pr-335-0.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker

在启动 AgentCompass 的机器上运行 Docker，并确保当前用户可以访问 daemon。任务镜像需要包含 Benchmark 和 Harness 所需的命令与依赖。

## 配置

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env docker \
  --env-params '{"setup":{"image":"python:3.13-slim"},"platform":"linux/amd64"}'
```

## Provider 参数

所有 provider 接受 [Environment 公共 schema](/zh/user_guide/modules/environments/configuration/overview) 以及各自声明的专属配置。通过下面的命令查看完整字段列表；专属配置与公共字段一起放在 `--env-params` 或 YAML 对应 provider 的扁平配置块中。镜像、资源、出站网络策略和环境变量仍使用统一入口，原生别名及未声明的键会报错。

```bash theme={"system"}
agentcompass config docs env docker
```

<a id="资源" />

使用 `resources`、`run_resources` 和 `evaluation_resources` 声明资源需求。不同 provider 的能力仍有差异：不支持的需求会明确报错，存储限制按已记录的 provider 支持策略处理。参见[资源限制](/zh/user_guide/modules/environments/configuration/resource_limits)。

## Provider 行为

支持仓库镜像、工作目录、启动命令和动态出站策略。正常清理会删除任务容器；使用 `--keep-environment` 可以保留容器。

使用 `setup.workdir` 设置默认命令目录，使用 `setup.build_timeout_seconds` 设置环境创建超时。Benchmark 通过准备后的输入独立选择任务 workspace；这两个设置都不会替代该 workspace 或单次命令超时。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.