v5 trained on 598 ex/task (20× v4's 30), with --defang-frac 0.5 over
the new ThreatFox + MalwareBazaar + OTX corpus. Final train_loss 0.3225
vs v4's 0.7397 (56% reduction), 60m20s wall clock on a 3090.
Live eval before swap:
- severity (botnet, ONLINE): v4 high / v5 high — tied, both correct
- ioc_extraction with defanged input (hxxps://, [.], (.), [dot]):
v4 kept hxxps:// in output (failed canonicalization)
v5 returned canonical https:// — defang training paid off
- ioc_extraction on real OTX-style prose (never trained on this shape):
v5 cleanly extracted 2 domains + 1 IP + 1 SHA256 + 1 CVE
Cockpit /api/inference-status confirms the swap:
{"online":true,"adapter":"/data/adapters/psyc-v5/final"}
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
# psyc — neuronetz.ai deployment stack.
|
|
#
|
|
# docker compose up -d --build # cockpit + mock-cert (no GPU)
|
|
# docker compose --profile gpu up -d --build # + the live model (needs an NVIDIA GPU)
|
|
#
|
|
# The cockpit is fronted by the external `backend` network's nginx-proxy as
|
|
# psyc.neuronetz.ai (point DNS for that name at the proxy host). mock-cert and
|
|
# the inference server stay internal — no VIRTUAL_HOST, reachable only inside
|
|
# `backend` by service name.
|
|
#
|
|
# WARNING: psyc has no built-in authentication. The reverse proxy / network
|
|
# perimeter is the security boundary. See docs/deploy.md.
|
|
|
|
services:
|
|
cockpit:
|
|
build: .
|
|
image: psyc:latest
|
|
command: ["psyc", "serve", "--host", "0.0.0.0", "--port", "8767"]
|
|
env_file: .env # per-dev API keys (gitignored). cp .env.example .env first.
|
|
environment:
|
|
VIRTUAL_HOST: psyc.neuronetz.ai
|
|
VIRTUAL_PORT: "8767"
|
|
PSYC_MOCK_CERT_URL: http://mock-cert:8770
|
|
PSYC_INFERENCE_URL: http://inference:8771
|
|
ports:
|
|
- "8767:8767" # direct/debug access; the proxy serves psyc.neuronetz.ai on :80
|
|
volumes:
|
|
- ./data:/data
|
|
networks: [backend]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8767/healthz')"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
mock-cert:
|
|
image: psyc:latest
|
|
command: ["psyc", "mock-cert", "--host", "0.0.0.0", "--port", "8770"]
|
|
volumes:
|
|
- ./data:/data
|
|
networks: [backend]
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8770/healthz')"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
# The live fine-tuned model behind the Classifier bot. GPU-only — opt in with
|
|
# `--profile gpu`. Uses the psyc-trainer image (built from Dockerfile.train).
|
|
inference:
|
|
image: psyc-trainer
|
|
command: ["/scripts/serve_model.py", "--adapter", "/data/adapters/psyc-v5/final", "--host", "0.0.0.0", "--port", "8771"]
|
|
volumes:
|
|
- ./data:/data
|
|
- ./scripts:/scripts
|
|
networks: [backend]
|
|
restart: unless-stopped
|
|
profiles: ["gpu"]
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8771/healthz')"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 90s
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|
|
|
|
networks:
|
|
backend:
|
|
name: backend
|
|
external: true
|