Quickstart
Installsail and harbor in the same Python environment (Harbor needs
Python 3.12 or newer) and set your Sail API key. Then run Harbor’s
hello-world dataset with the oracle agent, which runs each task’s
reference solution and doesn’t need a model key:
./jobs, and terminates the Sailbox when
the trial ends.
A real evaluation is the same command with a real agent, a model, and more
trials in flight. Each trial gets its own Sailbox, so the machine running
Harbor is no longer the limit on concurrency:
harbor run -c job.yaml) selects the environment the
same way:
Credentials and app
The process that runs Harbor needs a Sail credential: setSAIL_API_KEY, or
run sail auth login once on that machine. A run without one fails before
any trial starts, and the error says what is missing.
Sailboxes are created in the harbor app in your
organization, which is created on first use. To use a different app, pass
app_name to the environment, or set SAIL_APP. The argument wins when
both are set.
harbor- followed by the trial’s session id, and
sail box list --app harbor (or the app you chose) lists the ones a run
created.
Task images
Harbor decides where an environment’s image comes from, and Sail follows the same rules as Harbor’s other cloud providers.- A task that includes an
environment/Dockerfilehas it built into a Sailbox image. The build happens once per organization: the first trial of that task waits for it, and later trials start from the cached image.--force-buildrebuilds it. See Build an image from a Dockerfile for what a Dockerfile can contain. - A task that declares a
docker_imagein itstask.tomlruns on that image, pulled from its registry. Docker-style short references work:python:3.11meansdocker.io/library/python:3.11. The registry must be one Sail supports, the image must be public, and it must be Debian or Ubuntu based. See Bring your own base image for the full requirements. - A task can have both. Harbor treats
docker_imageas the published build of the Dockerfile and runs on that image unless you pass--force-build. - A task that includes an
environment/docker-compose.yamlruns as a Docker Compose project.
Docker Compose projects
The project runs inside the Sailbox. Commands run in the task’smain
service, and Harbor’s per-service operations (exec, download, stop) reach the
other services. If the task also has a docker_image or a Dockerfile, main
runs on that image, and the compose file’s main entry adds settings such as
environment or ports.
Each command in main uses non-login Bash and keeps the image’s PATH
unless the task or call overrides it. Commands in sidecar services use sh.
Sail builds the service images into the Sailbox image, cached and rebuilt the
same way as a Dockerfile build. The compose files follow the rules in
Build an image from a Compose project.
A project that uses an unsupported feature fails before a Sailbox is created,
and the error identifies the feature.
Copies between Compose containers and their Sailbox have a 30-minute timeout
per copy, allowing large artifacts more time to transfer. Set a different
positive timeout in seconds through the environment’s kwargs:
docker compose cp command for files or directories,
in either direction and for any service. Transfers between your local machine
and the Sailbox keep their separate limits, as do task commands and verifiers.
By default a Sailbox lives until Harbor deletes its environment. To make Sail
terminate every Sailbox a run creates on its own, a set number of seconds after
each one is created, pass max_lifetime_seconds the same way:
Compose variables
Compose variables
${VAR}or$VARin the task’s compose files takes its value from the variables the trial adds, then the task’senventries, then the environment of the machine running Harbor. Compose fills anything still unset from the project’s.env, then the default in the expression.- The task’s
enventries and the trial’s variables are passed to the project whether or not a compose file references them. DOCKER_HOSTand the other variables that select a Docker daemon (DOCKER_CONTEXT,DOCKER_CONFIG,DOCKER_CERT_PATH,DOCKER_TLS, andDOCKER_TLS_VERIFY) are not taken from the machine, even when a compose file references them. A taskenventry or trial variable with one of these names is still passed as written.- The build sees the same variables as the start.
Limits
A Sailbox is charged for the resources its workload actually consumes, and its limits are optional. The adapter maps a task’s resource requests onto them. The CPU request sets the Sailbox’s vCPU count, rounded up to a whole number, 1 to 8, and a task that doesn’t declare CPUs gets 1 vCPU. Memory and storage requests fit under the Sailbox’s default limits of 256 GiB of memory and 1024 GiB of disk; a task that requests more than that, or more than 8 CPUs, fails up front, before a Sailbox is created, and the error names the request and the limit. The vCPU count and the memory and disk limits are limits, not reservations. Regardless of configured limits, a Sailbox is only charged for the CPU, memory, and disk its workload actually consumes at runtime, so a task that requests 8 CPUs and uses one is charged for one. Harbor’scpu_enforcement_policy and memory_enforcement_policy settings
can be left at their default or set to request, which is how a Sailbox
honors a task’s resources. The limit and guarantee policies ask for an
enforced cap, which a Sailbox does not provide, so a job that sets one fails
up front.
Interactive sessions
harbor tasks start-env starts a task’s environment and opens a shell in
it on your terminal:
bash in the
main service when the task is a Compose project. The shell starts in the
task’s working directory with the task’s variables, as the agent’s commands
do. The environment is stopped and deleted when the shell exits.
Cleanup
By default,harbor run deletes each environment when its trial ends, which
terminates the Sailbox. A termination that fails does not change the trial’s
result: Harbor logs a warning naming the Sailbox, which may still be running.
Terminate it yourself with sail box terminate <id> or from the dashboard.
With --no-delete, Harbor stops each environment without deleting it. The
Sailbox goes to sleep with its filesystem and processes intact, and billing
stops while it sleeps. Harbor’s debug log names the Sailbox and the command
that reopens it, sail box shell <id>. Starting the environment again creates
a new Sailbox rather than waking the sleeping one. Terminate kept Sailboxes
yourself when you are done with them, with sail box terminate <id> or from
the dashboard.
A trial whose environment fails to start terminates its Sailbox before the
error is reported, even with --no-delete. A termination that fails there is
logged the same way, and the Sailbox may be left running.
Unsupported task features
Harbor checks a task’s needs against the environment before starting it, so a task that needs something unsupported fails up front with a clear error instead of running without the feature. Sailboxes do not offer:- GPUs, TPUs, or Windows environments.
- IPv6 allowlist entries. A Sailbox does not reach the internet over IPv6.
IPv6 loopback (
::1) works within each Sailbox, including withno-network. - A healthcheck that waits for a service the image’s
ENTRYPOINTorCMDwould start. A Sailbox boots a single-container image without running either, so nothing starts for the check to wait on, and the failure says so. Start the service from a Compose project instead, where each service runs its own entrypoint.
main service sees at that same path.