File size: 1,261 Bytes
f0273c6
 
a7525f2
 
 
f0273c6
 
 
a7525f2
 
f0273c6
 
a7525f2
 
 
f0273c6
 
a7525f2
f0273c6
 
 
a7525f2
f0273c6
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# OpenEnv Harbor environment server: Task API + capture proxy + web UI.
# Sandboxes are HF Sandboxes (Harbor's hf-sandbox backend: each rollout boots an
# HF Jobs cpu-basic machine running the task's prebuilt image). Only HF_TOKEN is
# needed — no Daytona/E2B account.
#
# Concurrency and capture settings are env vars, not CLI flags (verified against
# openenv 0.10.0 and the FineEnvs production env Space). MAX_CONCURRENT_ENVS must
# be >= the GRPO group size (8) or rollouts are rejected with CAPACITY_REACHED —
# it also bounds how many sandbox Jobs run at once under your HF account.
set -euo pipefail

PREPARED="${PREPARED:-/app/prepared}"
export OPENENV_DATASETS="${OPENENV_DATASETS:-$PREPARED/datasets/train,$PREPARED/datasets/test}"
export MAX_CONCURRENT_ENVS="${MAX_CONCURRENT_ENVS:-8}"
export OPENENV_MAX_OUTPUT_TOKENS=4096           # same cap as training + eval
export OPENENV_HARBOR_REWARD_KEY="correctness,reward"
# Pin the harness build so rollouts are reproducible (version from the FineEnvs Space).
export OPENENV_HARBOR_AGENT_VERSIONS='{"opencode":"1.18.31"}'

openenv harbor serve \
    --dataset "$OPENENV_DATASETS" \
    --port "${ENV_PORT:-8000}" \
    --capture-port "${CAPTURE_PORT:-8100}" \
    --expose gradio