python:3.14). For experiments that need compiled toolchains, large datasets, or non-trivial dependencies, startup time can dominate the evaluation budget. A custom base image lets you bake all of that into a single layer so sandboxes start instantly.
Build your image
A custom base image is a standard Docker image that contains your project’s source code and dependencies pre-installed at/app. The Hive expects the working directory to be /app and your source files to live there.
Here is an example Dockerfile from the hiverge/project-matmul project:
- Source lives in
/app— the Hive mounts evolved files into this directory at evaluation time, so your build artifacts, scripts, and evaluator must all be rooted here. - Pre-compile — running
make(or equivalent) during the build means sandboxes don’t waste evaluation time on compilation of unchanged code.
Push it to the Hive registry
Instead of pushing to a public registry, push the local image directly into the Hive-managed registry withhive push image:
hive:{short}:{tag} reference to store it under.
Reference it in your configuration
Point your experiment at the pushed image using thesandbox.base_image field:
Editing Files
Once the image is pushed and the first experiment is created, likely one will want to create a second experiment with minor modifications, e.g. to the evaluation script. The process for this is to overlay specific files onto the image, e.g.evaluator.py and src/foo.cpp found in SOURCE_DIR to the Hive. The Hive will copy the listed files to the Docker image. In the example evaluator.py will be copied to /app/evaluator.py and src/foo.cpp will be copied to /app/src/foo.cpp.
Summary
| Concern | Where it lives |
|---|---|
| Source code & build artifacts | /app inside the image |
| Git history | /app/.git inside the image |
| Runtime source updates | sandbox.setup_script using git |
| Image reference | sandbox.base_image in your config YAML |
hiverge/project-matmul.