Skip to content

Docker image

Your Docker image is the unit HyperOptimizer runs for each trial. It should contain your workload, dependencies, and a default command that runs one evaluation.

  • The default command runs one trial and exits.
  • The command accepts extra --hpo-* arguments (or plain --* if you configure that mode).
  • Dependencies are installed during the image build.
  • Data access is configured through files baked into the image or environment.
  • Metrics are printed to stdout before the process exits.
  • The image is published to your org Images registry before you create an experiment (see Publish an image).

A minimal image build context looks like this:

  • Dockerfile
  • requirements.txt
  • main.py
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "main.py"]

HyperOptimizer can then append trial parameters:

python main.py --hpo-lookback-window=50 --hpo-risk-multiplier=1.4

Keep images reproducible

Pin dependency versions so trial results are comparable over time.

Avoid hidden local state

Do not rely on files that only exist on your laptop. Put required assets in the image or configure access explicitly.

Fail clearly

Print enough logs to debug bad parameter sets and exit non-zero for real failures.