Simplify compose files and .env.example
Folders, port and image are written straight into compose.yaml; the KANAME_DATA_DIR, KANAME_MODELS_DIR, WEB_PORT and KANAME_IMAGE variables are gone. .env.example is down to the settings people actually set. README and CHANGELOG updated accordingly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bc1ad1395
commit
15d8ae155e
5 files changed
+92
-109
No files matched your search
+19
-20
@@ -1,49 +1,48 @@
|
||||
# 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
|
||||
image: git.linxweiler.xyz/pascallinxweiler/kaname:${KANAME_VERSION:-latest}
|
||||
env_file: .env
|
||||
ports: ["${WEB_PORT:-3000}:3000"]
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ${KANAME_DATA_DIR:-./data}:/data # SQLite database and results, shared with the worker (local disk, not NFS)
|
||||
- ./data:/data
|
||||
restart: unless-stopped
|
||||
|
||||
worker:
|
||||
<<: *kaname
|
||||
image: git.linxweiler.xyz/pascallinxweiler/kaname:${KANAME_VERSION:-latest}
|
||||
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
|
||||
- ./data:/data
|
||||
- ./models:/models # where models are downloaded to, e.g. /mnt/models
|
||||
- sandbox:/sandbox
|
||||
restart: unless-stopped
|
||||
|
||||
# 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.
|
||||
# Runs the coding answers of the quality eval (Python written by the model under test), locked
|
||||
# down: no network, no secrets, read-only. Optional: without it the eval skips the coding part.
|
||||
sandbox:
|
||||
<<: *kaname
|
||||
image: git.linxweiler.xyz/pascallinxweiler/kaname:${KANAME_VERSION:-latest}
|
||||
command: sandbox
|
||||
user: "65534:65534"
|
||||
depends_on: [worker]
|
||||
network_mode: none
|
||||
read_only: true
|
||||
tmpfs: ["/tmp:size=64m,mode=1777"]
|
||||
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:/sandbox
|
||||
depends_on: [worker]
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
sandbox:
|
||||
Reference in new issue
Block a user