bingran-you's picture
OpenEnv submission: fix-git source and image
5cd6b06 verified
Raw History Blame Contribute Delete
1.39 kB
# Author packaging for upstream OpenEnv tbench2_env (code unchanged, pinned OpenEnv revision).
# One Space per Terminal-Bench 2 task runtime: `openenv push --base-image <task image>` replaces the FROM line.
FROM alexgshaw/cancel-async-tasks@sha256:84c7fae6b256dcc56a350790e2a9715eefc7dad662a9d8e8a472363aa71ef18d
# Tier 1: the shared OpenEnv runtime layer, byte-identical in every image that copies it.
COPY --link --from=registry.hf.space/benchflow-arena-openenv-runtime@sha256:c6757a2e0aa0baad80ca6b1e36aaec1b722bd6a0eb3055073e7bd010fa3d42ba / /
# Tier 2: what this environment adds (its two dependencies and its code).
COPY . /opt/tbench2_env
RUN /opt/openenv/venv/bin/python -m pip install --no-cache-dir "camel-ai==0.2.90" "docker>=7.1.0" \
&& /opt/openenv/venv/bin/python -m pip install --no-cache-dir --no-deps /opt/tbench2_env \
&& mv /opt/tbench2_env/tasks /opt/tb2-tasks
# Configuration is part of the image: hosts that run the image (not the Space) see no Space variables.
ENV TB2_MODE=local TB2_TASKS_DIR=/opt/tb2-tasks TB2_WITHHOLD_TESTS=1 TB2_COMMAND_TIMEOUT_S=110 \
TB2_OUTPUT_DIR=/tmp/tbench2_env_runs MAX_CONCURRENT_ENVS=1 ENABLE_WEB_INTERFACE=false \
PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["/opt/openenv/venv/bin/python", "-m", "uvicorn", "server.app:app", "--app-dir", "/opt/tbench2_env", "--host", "0.0.0.0", "--port", "8000"]