From cf9a3f6d3f60bbd4bbdd5cd9a61a3baf75dc0d8d Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Thu, 17 Sep 2026 03:31:24 +0000 Subject: [PATCH] entrypoint override passes only the script path With --entrypoint python3, our 'python /work/main.py' runner became interpreter args: python3 tried to open a FILE named 'python' ("can't open file '/app/python'"). When an entrypoint is set it IS the interpreter -- pass just /work/. Co-Authored-By: Claude --- evalharness/sandbox/docker.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/evalharness/sandbox/docker.py b/evalharness/sandbox/docker.py index 8b40e72..208c822 100644 --- a/evalharness/sandbox/docker.py +++ b/evalharness/sandbox/docker.py @@ -91,13 +91,17 @@ class DockerSandbox(Sandbox): out_host = Path(hpath).expanduser() out_host.mkdir(parents=True, exist_ok=True) cmd += ['-v', f'{out_host}:{cpath}:rw'] - runner = ['python', f'/work/{entry}'] if entry.endswith('.py') \ - else ['sh', f'/work/{entry}'] if entrypoint: # images with an official-evaluator ENTRYPOINT (bigcodebench: # python3 -m bigcodebench.evaluate) swallow our runner as - # CLI args -> override it so main.py actually executes + # CLI args -> override it. The entrypoint IS the interpreter + # now: pass only the script path, else 'python3 python + # /work/main.py' tries to open a file named 'python' cmd += ['--entrypoint', entrypoint] + runner = [f'/work/{entry}'] + else: + runner = ['python', f'/work/{entry}'] if entry.endswith('.py') \ + else ['sh', f'/work/{entry}'] # Named + retried runs. A timed-out/killed `docker run` only kills # the CLI client -- the container lives on (--rm fires on EXIT) # and leaked containers slowly drown the daemon; the name gives