Upload folder using huggingface_hub
Browse files- Dockerfile +9 -15
- server/Dockerfile.per-image-venv +22 -0
Dockerfile
CHANGED
|
@@ -1,22 +1,16 @@
|
|
| 1 |
# Author packaging for upstream OpenEnv tbench2_env (code unchanged, pinned OpenEnv revision).
|
| 2 |
-
# Terminal-Bench 2
|
| 3 |
-
# deploy one Space per task with `openenv push --base-image <that task's image>`, which
|
| 4 |
-
# replaces the FROM line below. The server runs in local mode inside the task's own runtime.
|
| 5 |
FROM alexgshaw/fix-code-vulnerability@sha256:cac325252991f823713b2d0441502972901dd782bd67f66c03d9b1e410dac5c0
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
RUN
|
| 11 |
-
&& /opt/openenv
|
| 12 |
-
|
| 13 |
-
"camel-ai==0.2.90" "docker>=7.1.0"
|
| 14 |
-
COPY . /opt/openenv/tbench2_env
|
| 15 |
-
RUN mv /opt/openenv/tbench2_env/tasks /opt/tb2-tasks \
|
| 16 |
-
&& /opt/openenv-venv/bin/pip install --no-cache-dir --no-deps /opt/openenv/tbench2_env
|
| 17 |
# Configuration is part of the image: hosts that run the image (not the Space) see no Space variables.
|
| 18 |
ENV TB2_MODE=local TB2_TASKS_DIR=/opt/tb2-tasks TB2_WITHHOLD_TESTS=1 TB2_COMMAND_TIMEOUT_S=110 \
|
| 19 |
TB2_OUTPUT_DIR=/tmp/tbench2_env_runs MAX_CONCURRENT_ENVS=1 ENABLE_WEB_INTERFACE=false \
|
| 20 |
PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
| 21 |
EXPOSE 8000
|
| 22 |
-
CMD ["/opt/openenv
|
|
|
|
| 1 |
# Author packaging for upstream OpenEnv tbench2_env (code unchanged, pinned OpenEnv revision).
|
| 2 |
+
# One Space per Terminal-Bench 2 task runtime: `openenv push --base-image <task image>` replaces the FROM line.
|
|
|
|
|
|
|
| 3 |
FROM alexgshaw/fix-code-vulnerability@sha256:cac325252991f823713b2d0441502972901dd782bd67f66c03d9b1e410dac5c0
|
| 4 |
+
# Tier 1: the shared OpenEnv runtime layer, byte-identical in every image that copies it.
|
| 5 |
+
COPY --link --from=registry.hf.space/benchflow-arena-openenv-runtime@sha256:17ac04ab2ab53def7919f1125eb91398198931f025aa8f0c60a9642d50175371 /opt/openenv /opt/openenv
|
| 6 |
+
# Tier 2: what this environment adds (its two dependencies and its code).
|
| 7 |
+
COPY . /opt/tbench2_env
|
| 8 |
+
RUN /opt/openenv/venv/bin/python -m pip install --no-cache-dir "camel-ai==0.2.90" "docker>=7.1.0" \
|
| 9 |
+
&& /opt/openenv/venv/bin/python -m pip install --no-cache-dir --no-deps /opt/tbench2_env \
|
| 10 |
+
&& mv /opt/tbench2_env/tasks /opt/tb2-tasks
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Configuration is part of the image: hosts that run the image (not the Space) see no Space variables.
|
| 12 |
ENV TB2_MODE=local TB2_TASKS_DIR=/opt/tb2-tasks TB2_WITHHOLD_TESTS=1 TB2_COMMAND_TIMEOUT_S=110 \
|
| 13 |
TB2_OUTPUT_DIR=/tmp/tbench2_env_runs MAX_CONCURRENT_ENVS=1 ENABLE_WEB_INTERFACE=false \
|
| 14 |
PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
| 15 |
EXPOSE 8000
|
| 16 |
+
CMD ["/opt/openenv/venv/bin/python", "-m", "uvicorn", "server.app:app", "--app-dir", "/opt/tbench2_env", "--host", "0.0.0.0", "--port", "8000"]
|
server/Dockerfile.per-image-venv
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Author packaging for upstream OpenEnv tbench2_env (code unchanged, pinned OpenEnv revision).
|
| 2 |
+
# Terminal-Bench 2 tasks each define their own runtime image, so this file is single-stage:
|
| 3 |
+
# deploy one Space per task with `openenv push --base-image <that task's image>`, which
|
| 4 |
+
# replaces the FROM line below. The server runs in local mode inside the task's own runtime.
|
| 5 |
+
FROM alexgshaw/cancel-async-tasks@sha256:84c7fae6b256dcc56a350790e2a9715eefc7dad662a9d8e8a472363aa71ef18d
|
| 6 |
+
USER root
|
| 7 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
+
python3 python3-venv git curl ca-certificates \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
RUN python3 -m venv /opt/openenv-venv \
|
| 11 |
+
&& /opt/openenv-venv/bin/pip install --no-cache-dir \
|
| 12 |
+
"openenv @ git+https://github.com/meta-pytorch/OpenEnv.git@86a180ede21e044f7929b9a7783ad83aa67d83a3" \
|
| 13 |
+
"camel-ai==0.2.90" "docker>=7.1.0"
|
| 14 |
+
COPY . /opt/openenv/tbench2_env
|
| 15 |
+
RUN mv /opt/openenv/tbench2_env/tasks /opt/tb2-tasks \
|
| 16 |
+
&& /opt/openenv-venv/bin/pip install --no-cache-dir --no-deps /opt/openenv/tbench2_env
|
| 17 |
+
# Configuration is part of the image: hosts that run the image (not the Space) see no Space variables.
|
| 18 |
+
ENV TB2_MODE=local TB2_TASKS_DIR=/opt/tb2-tasks TB2_WITHHOLD_TESTS=1 TB2_COMMAND_TIMEOUT_S=110 \
|
| 19 |
+
TB2_OUTPUT_DIR=/tmp/tbench2_env_runs MAX_CONCURRENT_ENVS=1 ENABLE_WEB_INTERFACE=false \
|
| 20 |
+
PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
| 21 |
+
EXPOSE 8000
|
| 22 |
+
CMD ["/opt/openenv-venv/bin/python", "-m", "uvicorn", "server.app:app", "--app-dir", "/opt/openenv/tbench2_env", "--host", "0.0.0.0", "--port", "8000"]
|