[PR #2336] [CLOSED] sycl serve: opt-in non-root engine container and read-only data mount #3988

Closed
opened 2026-11-07 15:32:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2336
Author: @leadgtr7
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: sycl-serve-user-ro


📝 Commits (1)

  • c5a7220 sycl serve: opt-in non-root engine container and read-only data mount

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 sycl/serve/strata-sycl.sh (+11 -1)

📄 Description

What it changes: two opt-in settings in sycl/serve/strata-sycl.sh, documented in its header:

  • STRATA_SYCL_USER=uid:gid runs the engine container as that user (--user, HOME=/tmp) and adds the groups that own /dev/dri/* (--group-add), so the engine can still open the GPU.
  • STRATA_SYCL_RO=1 mounts the data root at /work read-only.

Why: the container runs as root with the whole data root (models, packs, the checkout) mounted read-write, though the engine only reads it while serving. With these set, a fault or a bad input in the engine cannot write to the model files or the checkout. docs/A770_SPEED_SPEC.md also notes the root container stops gputop from attributing the engine; a user-owned engine fixes that.

What it leaves alone: with neither variable set, the docker run arguments are identical to main (checked with a docker stub that prints them, sorted, env -i). Builds still need a writable mount; this is for serving only. CUDA/HIP untouched.

How it was checked:

  • The docker stub: default identical to main; with STRATA_SYCL_USER=65534:65534 STRATA_SYCL_RO=1 the arguments gain --user 65534:65534, -e HOME=/tmp, one --group-add per /dev/dri group and <root>:/work:ro.
  • On one Arc Pro B65 (xe driver, render group access through --group-add), a v0.1.44 engine built for bmg-g31 ran Swift 1.5 IQ3_S with STRATA_SYCL_USER=65534:65534 STRATA_SYCL_RO=1 (docker inspect: user 65534:65534, /work with RW=false) through every arm of our benchmark runs (36.8 tok/s decode), a 61,052-token prompt (finish stop) and a "parallel": 2 run with four concurrent requests. The same two settings have run in our daily server since 0.1.41; when we turned them on there, decode stayed within run-to-run noise on the same build. We did not repeat that root vs non-root comparison on 0.1.44.

Not tested: rootless Docker, Podman, two-card setups.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2336 **Author:** [@leadgtr7](https://github.com/leadgtr7) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `sycl-serve-user-ro` --- ### 📝 Commits (1) - [`c5a7220`](https://github.com/Niko1221/Strata/commit/c5a722013769349f4bd8ad8a4138d4e859f38a94) sycl serve: opt-in non-root engine container and read-only data mount ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `sycl/serve/strata-sycl.sh` (+11 -1) </details> ### 📄 Description **What it changes:** two opt-in settings in `sycl/serve/strata-sycl.sh`, documented in its header: - `STRATA_SYCL_USER=uid:gid` runs the engine container as that user (`--user`, `HOME=/tmp`) and adds the groups that own `/dev/dri/*` (`--group-add`), so the engine can still open the GPU. - `STRATA_SYCL_RO=1` mounts the data root at `/work` read-only. **Why:** the container runs as root with the whole data root (models, packs, the checkout) mounted read-write, though the engine only reads it while serving. With these set, a fault or a bad input in the engine cannot write to the model files or the checkout. docs/A770_SPEED_SPEC.md also notes the root container stops `gputop` from attributing the engine; a user-owned engine fixes that. **What it leaves alone:** with neither variable set, the `docker run` arguments are identical to main (checked with a `docker` stub that prints them, sorted, `env -i`). Builds still need a writable mount; this is for serving only. CUDA/HIP untouched. **How it was checked:** - The `docker` stub: default identical to main; with `STRATA_SYCL_USER=65534:65534 STRATA_SYCL_RO=1` the arguments gain `--user 65534:65534`, `-e HOME=/tmp`, one `--group-add` per `/dev/dri` group and `<root>:/work:ro`. - On one Arc Pro B65 (xe driver, render group access through `--group-add`), a v0.1.44 engine built for `bmg-g31` ran Swift 1.5 IQ3_S with `STRATA_SYCL_USER=65534:65534 STRATA_SYCL_RO=1` (`docker inspect`: user `65534:65534`, `/work` with `RW=false`) through every arm of our benchmark runs (36.8 tok/s decode), a 61,052-token prompt (finish `stop`) and a `"parallel": 2` run with four concurrent requests. The same two settings have run in our daily server since 0.1.41; when we turned them on there, decode stayed within run-to-run noise on the same build. We did not repeat that root vs non-root comparison on 0.1.44. **Not tested:** rootless Docker, Podman, two-card setups. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:32:16 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3988
No description provided.