FluxBenchDeveloper guides

DOCKER / AGENT INTEGRATION

Run your agent on FluxBench

If you already have an Agent, follow three stages to integrate, package and submit it. Any framework works; FluxBench needs a container entrypoint that reads the task, calls the model and EDA tools, produces deliverables and exits.

Stage 01 / Integration

Integrate Your Agent

Connect your existing Agent to the FluxBench runtime contract: read the task, call the model, produce deliverables and run EDA through the platform commands.

01.1

Configure the Agent entrypoint

Provide an entrypoint that the container can run at startup, for example fluxbench_entry.py. The filename and language are up to you. It must:

  1. Read the platform task instructions and benchmark inputs.
  2. Use the model configuration selected on the website.
  3. Write deliverables to the task workspace.
  4. Print stage progress to stdout.
  5. Exit when complete: return 0 on success and nonzero on failure.

Runtime values

Environment variableUse
TASK_PROMPT_PATHRequired. Path to the platform-generated task instructions.
TASK_WORK_DIRRequired. Workspace for scripts, runtime files and deliverables.
FLUXBENCH_INPUT_ROOTRequired. Read-only benchmark inputs and checklists.
FLUXBENCH_OUTPUT_ROOTRequired. Directory collected by the platform.
FLUXBENCH_TASK_FILEUsed to identify upload preflight; when eda is null, write the probe file and exit without model or EDA calls.
OPENAI_API_KEY
OPENAI_BASE_URL
Use when the OpenAI protocol is selected.
ANTHROPIC_API_KEY
ANTHROPIC_BASE_URL
Use when the Anthropic protocol is selected.
MODEL_NAMEModel ID selected on the website during evaluation.
Upload preflight: Upload preflight has no model configuration. During evaluation, if the selected key, base URL or MODEL_NAME is missing, the entrypoint should fail clearly. You do not need to install DC, Innovus or PrimeTime or mount host EDA directories in the image.

The example shows the entrypoint structure. Replace MyExistingAgent and agent.run(...) with your framework call; upload preflight has no model configuration.

Python · fluxbench_entry.py
import json
import os
import sys
from pathlib import Path


def required(name):
    value = os.environ.get(name)
    if not value:
        raise RuntimeError(f"Missing environment variable: {name}")
    return value


task = json.loads(Path(required("FLUXBENCH_TASK_FILE")).read_text())
input_dir = Path(required("FLUXBENCH_INPUT_ROOT"))
output_dir = Path(required("FLUXBENCH_OUTPUT_ROOT"))
work_dir = Path(required("TASK_WORK_DIR"))
prompt = Path(required("TASK_PROMPT_PATH")).read_text(encoding="utf-8")
output_dir.mkdir(parents=True, exist_ok=True)

# Upload preflight is identified by the task manifest and has no model credentials.
if task.get("eda") is None:
    (output_dir / "smoke_probe.txt").write_text("ok\n", encoding="utf-8")
    sys.exit(0)

api_key = os.environ.get("OPENAI_API_KEY") or os.environ.get("ANTHROPIC_API_KEY")
base_url = os.environ.get("OPENAI_BASE_URL") or os.environ.get("ANTHROPIC_BASE_URL")
model = os.environ.get("MODEL_NAME")
if not api_key or not base_url or not model:
    raise RuntimeError("Model configuration is incomplete")

agent = MyExistingAgent(api_key=api_key, base_url=base_url, model=model)
success = agent.run(prompt=prompt, input_dir=input_dir,
                    work_dir=work_dir, output_dir=output_dir)
sys.exit(0 if success else 1)

Print one JSON progress record per line to stdout. Use dc, innovus or pt as the stage; emit END only after the stage checks pass.

stdout · stage progress
print(json.dumps({"kind": "stage_progress", "stage": "dc", "event": "START"}), flush=True)
# Run DC and confirm its output checklist passes, then:
print(json.dumps({"kind": "stage_progress", "stage": "dc", "event": "END"}), flush=True)
01.2

Call the platform EDA tools

Your Agent calls EDA through the platform commands on the image PATH, like ordinary CLI tools. Change to the relevant task directory and run the Tcl script for that stage.

Shell / Tcl command
# Tcl scripts must be inside the task workspace and use the .tcl suffix
dc_shell -f synth.tcl
innovus -nowin -init route.tcl
pt_shell -f timing.tcl
# PrimeTime DMSA mode: pt_shell -multi -f eco.tcl

Use -f SCRIPT with dc_shell and pt_shell; Innovus uses -init SCRIPT in non-GUI mode. -multi is only for PrimeTime. The commands run the real EDA tools on the Worker, stream logs to stdout/stderr and return the operation result through the exit code. The image must include Python 3 for the command bridge.

The current directory and Tcl script must stay inside the task workspace, and the script must use the .tcl suffix. Interactive EDA shells are not supported. Inspect tool logs and run the relevant stage output checks instead of treating a zero exit code alone as proof that the deliverables are valid.

Tcl can read inputs through $::env(FLUXBENCH_INPUT_ROOT) and locate deliverables through $::env(FLUXBENCH_OUTPUT_ROOT). The container and Worker EDA tools see the same absolute task paths. Preserve the injected PATH when starting a child shell, and avoid login shells that reset the environment. Do not package commercial EDA software, licenses or technology libraries.

Stage 02 / Packaging

Package and Build the Image

The image is the container used to start your Agent. Install dependencies during the build and declare the entrypoint as the default startup command.

linux/amd64Build for the amd64 architecture.
ENTRYPOINT or CMDPoint it to your Agent entrypoint.
Numeric UID/GIDRoot is allowed; USER 1000:1000 is recommended.
No VOLUMENeither the Dockerfile nor its base image may declare one.
Clean build contextExclude .env, keys, SSH credentials, caches and old results.
Runtime dependenciesInclude your Agent source and dependencies.
Dockerfile
FROM python:3.11-slim
WORKDIR /opt/agent
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/ ./src/
COPY fluxbench_entry.py .
USER 1000:1000
ENTRYPOINT ["python", "-u", "/opt/agent/fluxbench_entry.py"]

Build and export the image from the directory containing the Dockerfile:

Shell / Tcl command
docker build --platform linux/amd64 -t my-agent:v1 .
docker save my-agent:v1 | gzip > my-agent.tar.gz
Upload format: Upload a .tar or .tar.gz archive created by docker save, no larger than 1 GiB. Do not use docker export.

Stage 03 / Submission

Upload and Submit

After the image passes upload preflight, choose the benchmark and runtime configuration and submit the evaluation.

  1. Sign in to FluxBench, open Public Eval, select Customer worker and upload the .tar or .tar.gz image.
  2. Wait for automatic preflight. A passing image shows Verified; if it fails, review the checks and logs, fix the image and upload it again.
  3. Select the benchmark, model/API configuration, target Worker and frequency, then confirm the evaluation.
Frequency options: NVDLA currently supports only 100 MHz. FluxBench provides the task instructions and inputs for the selected benchmark.