sha256:c16714d69b062753fef8914ec0d8b4deff0cebcc87c1c7082d9942a23bcb64e9
Last pushed
about 1 month by yashdiq
Type
Sandbox Kit
Manifest digest
sha256:c16714d69b062753fef8914ec0d8b4deff0cebcc87c1c7082d9942a23bcb64e9
schemaVersion: "2"
kind: sandbox
name: yas
version: 1.0.0-kit
displayName: Yas (self-hosted Jev-style decision maker)
description: 'Self-hosted decision sandbox: Kev, a Jev-like family of decision models, behind TypeSafe''s System One wire API. POST /v1/systemone answers typed choice, score and noul questions over any state, with calibrated probabilities, in one request. Weights are baked into the image, so the sandbox needs no API keys and can run with zero egress.'
sandbox:
image: docker.io/yashdiq/yas:1.0.0
ports:
- container: 8009
name: yas
environment:
variables:
KEV_BASE_URL: http://127.0.0.1:8009
KEV_HOST: 0.0.0.0
KEV_MODEL: jaredpalmer/kev-0.8b
KEV_PORT: "8009"
setup:
install:
- command: python /opt/yas/warmup.py --model jaredpalmer/kev-0.8b --offline --timeout 600
description: Verify the baked kev weights load offline.
startup:
- command:
- python
- /opt/yas/serve_docs.py
- --run
- jaredpalmer/kev-0.8b
- --host
- 0.0.0.0
- --port
- "8009"
user: "0"
background: true
description: Serve kev behind the System One API on port 8009 (Scalar docs at /docs).
- command:
- python
- -c
- |
import os, time, urllib.request
for _ in range(150):
try:
req = urllib.request.Request("http://127.0.0.1:" + os.environ.get("KEV_PORT", "8009") + "/v1/models")
if os.environ.get("KEV_API_KEY"):
req.add_header("authorization", "Bearer " + os.environ["KEV_API_KEY"])
urllib.request.urlopen(req, timeout=4)
print("yas ready on port", os.environ.get("KEV_PORT", "8009"))
break
except Exception:
time.sleep(2)
else:
raise SystemExit("yas server did not become ready; check the sandbox logs")
user: "0"
description: Wait until the kev server answers /v1/models.