From 69c9d4b07239755f7a63a042a497dceb60f04a0d Mon Sep 17 00:00:00 2001 From: JasonOA888 Date: Thu, 7 May 2026 11:23:38 +0800 Subject: [PATCH] fix: copy eval requirements.txt into Docker build context _default_dockerfile generates 'COPY requirements.txt /tmp/requirements.txt' but the file lives at skill_dir/evals/requirements.txt, which is outside the Docker build context (task_dir/environment/). The evals/ directory is also explicitly excluded from the skills copytree. This causes Docker build to fail with 'requirements.txt not found' when a skill eval specifies custom Python dependencies. Fix: copy evals/requirements.txt into the environment directory during task generation so the Dockerfile COPY can find it. --- src/benchflow/skill_eval.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/benchflow/skill_eval.py b/src/benchflow/skill_eval.py index 528c5348..27b2cc80 100644 --- a/src/benchflow/skill_eval.py +++ b/src/benchflow/skill_eval.py @@ -272,6 +272,11 @@ def generate_tasks( ignore=shutil.ignore_patterns("evals", "__pycache__", ".git"), ) + # Copy eval requirements.txt into build context so Docker COPY can find it + eval_reqs = dataset.skill_dir / "evals" / "requirements.txt" + if eval_reqs.exists(): + shutil.copy2(eval_reqs, env_dir / "requirements.txt") + # tests/ tests_dir = task_dir / "tests" tests_dir.mkdir(exist_ok=True)