interplane-forge
INTERPLANE Forge
Brought by drakestapleton
interplane-forge / infra / spark / interplane-salvage.service
| 1 | # INTERPLANE salvage collector: verifies the queued submission outside the forged sandbox. |
| 2 | # Install and undo: docs/SALVAGE.md "Running it beside the sandboxed server". |
| 3 | # The server (interplane-forged.service with FORGED_SALVAGE=on) only queues one job file in the |
| 4 | # store; this program compiles and runs the submission in its own empty namespace (bwrap, prlimit, |
| 5 | # execpure) with the pinned compiler, writes the receipt and removes the job. It opens no socket. |
| 6 | # The scratch folder is outside the store on purpose: the sandboxed server can write the store. |
| 7 | [Unit] |
| 8 | Description=INTERPLANE salvage collector: verify the queued submission in a sandbox with the pinned compiler and write its receipt (polls one job file) |
| 9 | |
| 10 | [Service] |
| 11 | Environment=INTERPLANE_SALVAGE_DIR=%h/forge-data/salvage/ |
| 12 | Environment=INTERPLANE_SALVAGE_WORK=%h/forge-salvage-work/ |
| 13 | Environment=SALVAGE_DIR=%h/.local/lib/interplane-salvage/current |
| 14 | ExecStart=/usr/bin/env -i INTERPLANE_SALVAGE_DIR=${INTERPLANE_SALVAGE_DIR} INTERPLANE_SALVAGE_WORK=${INTERPLANE_SALVAGE_WORK} OMEGA_COMPILER=${SALVAGE_DIR}/omc ${SALVAGE_DIR}/salvage-collector |
| 15 | Restart=always |
| 16 | RestartSec=5 |
| 17 | Nice=10 |
| 18 | CPUAffinity=4 5 |
| 19 | UMask=0077 |
| 20 | NoNewPrivileges=yes |
| 21 | |
| 22 | [Install] |
| 23 | WantedBy=default.target |