interplane.Get Omega
Read in your language

aienos.com

Source of www.aienos.com, served from my own hardware

Brought by drakestapleton

branch main Branches Tags History

aienos.com / scripts / allen / science / allen-science-math-fg

16 lines · 994 bytes Raw Blame History
1#!/bin/sh
2# Interim foreground launcher for allen-science-math: the same service, sandbox and privilege drop
3# as allen-science-fg, on 127.0.0.1:18114 with only the math_compute tool. allen-chat (the public
4# /aien/api/math route) may reach this port and no other science port, so a public request can
5# never call omega_compile, web_app, paper, research or plot. Run as `sudo -n` by spark-supervisor
6# until aien-supervise owns it (allen-science-math.svc).
7# Install: root:root 0755 at /usr/local/libexec/aien-supervise/allen-science-math-fg.
8set -eu
9umask 077
10exec </dev/null
11if ss -ltnH 'sport = :18114' | grep -q .; then echo "allen-science-math-fg: port 18114 already in use" >&2; exit 1; fi
12exec /usr/bin/setpriv --reuid=allen-science --regid=allen-science --clear-groups \
13 --no-new-privs --inh-caps=-all --bounding-set=-all \
14 /usr/bin/env -i PATH=/usr/bin:/bin \
15 /usr/bin/python3.12 -I /opt/allen-science/launch.py --listen 127.0.0.1:18114 \
16 -- --port 18114 --tools math_compute