# Kaname: put this file and a filled-in .env (from .env.example) in one folder, then # docker compose up -d # The data and models folders are created next to this file unless .env points elsewhere. name: kaname x-kaname: &kaname # Public image, no login needed. Pin a version with KANAME_VERSION=0.15.2 in .env. image: ${KANAME_IMAGE:-git.linxweiler.xyz/pascallinxweiler/kaname}:${KANAME_VERSION:-latest} restart: unless-stopped services: web: <<: *kaname env_file: .env ports: ["${WEB_PORT:-3000}:3000"] volumes: - ${KANAME_DATA_DIR:-./data}:/data # SQLite database and results, shared with the worker (local disk, not NFS) worker: <<: *kaname command: worker env_file: .env environment: SANDBOX_DIR: /sandbox volumes: - ${KANAME_DATA_DIR:-./data}:/data - ${KANAME_MODELS_DIR:-./models}:/models # downloaded models (a NAS share mounted on the host works) - sandbox:/sandbox # exchange folder with the code sandbox # Runs the quality eval's coding answers (Python written by the model under test): no network, a # read-only root, no capabilities, small limits, an unprivileged user, and only the exchange # folder shared with the worker. No .env (no secrets). Optional: without it the eval skips coding. sandbox: <<: *kaname command: sandbox user: "65534:65534" depends_on: [worker] network_mode: none read_only: true tmpfs: ["/tmp:size=64m,mode=1777"] cap_drop: [ALL] security_opt: ["no-new-privileges:true"] mem_limit: 512m pids_limit: 64 cpus: 1 volumes: [sandbox:/sandbox] volumes: sandbox: