bots-garden/houlapublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/houla.git
git clone ssh://git@rickub.com/bots-garden/houla.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 6dcdaeb · on main · k33g · 1h ago
sbxenv.yaml · 77 lines · 3.1 KBYAML Blame HistoryRaw
 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
schemaVersion: "1"

# Sandbox that serves an Olala GGUF model with llama-server (OpenAI-compatible API)
# on the host, using the OVHai llama.cpp fork (CPU only) from kits/llama-cpp-olala.
#
#   sbx env create sbxenv.yaml                                   # create + download + serve
#   sbx env create sbxenv.yaml --env-arg host_port=9090          # another host port
#   sbx env create sbxenv.yaml --env-arg models_dir=./my-models  # another models folder
#   sbx env run    sbxenv.yaml                                   # attach Claude Code
#   sbx env exec --no-input sbxenv.yaml -- bash -lc '$SBX_WS/scripts/olala.sh serve'   # restart after `sbx stop`
#   sbx env rm     sbxenv.yaml                                   # models stay in models_dir
#
# Every step of scripts/olala.sh is skipped when already done (llama-server found,
# model present, server running), so re-running it is cheap.
# Use the same --env-arg values with every sbx env command of a given sandbox.

name: houla-olala

agent: shell

workspace: .

kits:
  # llama-server / llama-cli from the OVHai fork (built by sbx from the local kit).
  - ./kits/llama-cpp-olala

args:
  model_repo:
    default: OVHaiLLM/Olala-v1.0-mini-7A1B-GGUF
    description: Hugging Face repository of the GGUF file
  model_file:
    #default: Olala-v1.0-mini-7A1B-q8_0-safe2.gguf
    default: Olala-v1.0-mini-7A1B-q5_k_m.gguf
    description: GGUF file to download and serve (q8_0-safe2 = recommended for CPUs)
  models_dir:
    default: ./models
    description: Where models are stored; relative to the repository root, kept when the sandbox is removed
  host_port:
    default: "8080"
    pattern: "[1-9][0-9]*"
    description: Host port that publishes llama-server
  threads:
    default: "16"
    pattern: "[1-9][0-9]*"
    description: CPU threads used by llama-server (leave a couple of CPUs free)
  ctx:
    default: "16384"
    pattern: "[1-9][0-9]*"
    description: Context size (shared by the parallel slots)

env:
  #ANTHROPIC_MODEL: claude-opus-5-5
  OLALA_MODEL_REPO: "${{ env.args.model_repo }}"
  OLALA_MODEL_FILE: "${{ env.args.model_file }}"
  OLALA_MODELS_DIR: "${{ env.args.models_dir }}"
  OLALA_THREADS: "${{ env.args.threads }}"
  OLALA_CTX: "${{ env.args.ctx }}"
  OLALA_PORT: "8080"
  SBX_WS: "${{ env.fileDir }}"

ports:
  - sandbox: 8080
    host: ${{ env.args.host_port }}

# Lifecycle commands run on the HOST; they reach into the sandbox with `sbx env exec`.
# postCreate runs once, after creation (not on re-attach).
lifecycle:
  postCreate:
    # A local sandbox stops as soon as no session keeps it running (and llama-server with it).
    # Detached mode keeps it running until `sbx stop`; it is permanent for this sandbox.
    - name: Keep the sandbox running in the background (detached)
      command: sbx run -d --name "$SBX_SANDBOX_NAME"
      timeout: 2m
    - name: Download the model (if missing) and start llama-server
      # Flags go BEFORE the env file path: after it, sbx reads every word up to `--` as another path.
      command: sbx env exec --name "$SBX_SANDBOX_NAME" --no-input "$SBX_ENV_FILE" -- bash -lc "bash \"$SBX_WORKSPACE/scripts/olala.sh\" up"
      timeout: 30m