Harbor
Runta integrates with harbor and serve as Harbor environment provider. Harbor still owns the job, task, agent, verifier, and artifact flows. Runta provides the controlled runtime where each trial runs.
The provider import path is:
runta_harbor.environment:RuntaEnvironmentInstall
Section titled “Install”This requires Python 3.12 or later.
python -m venv .venvsource .venv/bin/activatepython -m pip install --upgrade pippython -m pip install "runta-sdk[harbor]"uv venv --python <compatible_python_version>source .venv/bin/activateuv pip install "runta-sdk[harbor]"This installs the Runta SDK, the runta_harbor
provider module, and Harbor into the same Python environment. Harbor’s Python
package provides the harbor CLI.
Set your Runta credentials:
export RUNTA_TOKEN=rt_...Run an Existing Harbor Dataset
Section titled “Run an Existing Harbor Dataset”Run one task from a published Harbor dataset:
harbor run \ -d terminal-bench-sample@2.0 \ -a oracle \ -l 1 \ --environment-import-path runta_harbor.environment:RuntaEnvironment \ --ek mode=autouvx --with "runta-sdk[harbor]" harbor run \ -d terminal-bench-sample@2.0 \ -a oracle \ -l 1 \ --environment-import-path runta_harbor.environment:RuntaEnvironment \ --ek mode=autoThis runs Harbor’s built-in oracle agent against one task from the
terminal-bench-sample@2.0 dataset and prints the trial result when Harbor
finishes.
Use in a Harbor Job
Section titled “Use in a Harbor Job”Create a Harbor JobConfig with EnvironmentConfig(import_path=...).
import asyncio
from harbor.job import Jobfrom harbor.models.job.config import DatasetConfig, JobConfigfrom harbor.models.trial.config import AgentConfig, EnvironmentConfig
RUNTA_ENV_IMPORT_PATH = "runta_harbor.environment:RuntaEnvironment"
async def main() -> None: config = JobConfig( job_name="runta-harbor-demo", jobs_dir="jobs", n_concurrent_trials=2, agents=[AgentConfig(name="oracle")], environment=EnvironmentConfig( import_path=RUNTA_ENV_IMPORT_PATH, type=None, kwargs={ "mode": "auto", }, ), datasets=[ DatasetConfig(name="terminal-bench-sample", version="2.0", n_tasks=1), ], )
job = await Job.create(config) result = await job.run() print(result)
asyncio.run(main())What Runta Handles
Section titled “What Runta Handles”RuntaEnvironment implements Harbor’s normal environment interface:
startcreates and starts a Runta runtime.execruns Harbor agent and verifier commands in that runtime.upload_fileandupload_dircopy solutions, tests, and task assets in.download_fileanddownload_dircopy verifier logs and reward artifacts out.- Compose sidecar
service_exec, sidecar file and directory downloads, andstop_service. set_network_policymaps Harbor network policies onto Runta egress controls.stopdeletes the runtime after the trial by default.
Normal Harbor tasks can use Runta for agent execution, verifier execution, task asset upload, solution upload, health checks, main-service logs, main-service artifacts, compose sidecar artifact collection, and direct file or directory copy operations.
The provider selects direct, docker, or compose mode automatically. Set
--ek mode=direct, --ek mode=docker, or --ek mode=compose to force a mode.
Current Limitations
Section titled “Current Limitations”harbor run -e runtais not available until Harbor registers Runta as an upstream environment type. Use--environment-import-path runta_harbor.environment:RuntaEnvironmentfor now.- GPU, TPU, Windows, and mounted-resource task requirements are not supported.
- Storage override settings are accepted by Harbor but not applied to Runta runtime creation yet.
- Private registry pulls depend on Docker credentials already being available inside the Runta runtime; there is no Harbor-specific registry login flow yet.
Troubleshooting
Section titled “Troubleshooting”If Harbor fails with No module named 'runta_harbor', the harbor command is
running from a Python environment that does not have runta-sdk[harbor]
installed. This commonly happens when which harbor points to a global uv tool install, such as ~/.local/bin/harbor.
Use uvx for a quick fix:
uvx --with "runta-sdk[harbor]" harbor run \ -d terminal-bench-sample@2.0 \ -a oracle \ -l 1 \ --environment-import-path runta_harbor.environment:RuntaEnvironment \ --ek mode=auto