贡献 / #2335
#2335 sycl serve: keep STRATA_API_KEY out of the engine container
open · @leadgtr7 · 0 评论 · 去 GitHub 看
Server & APIAMD / HIPNVIDIA / CUDAWindowsLinux
说明
**What it changes:** one line in `sycl/serve/strata-sycl.sh`: the loop that forwards `STRATA_*` variables into the engine container now skips `STRATA_API_KEY`, the same way it already skips the script's own `STRATA_SYCL_*` settings. The header comment says so. **Why:** the server takes its key from `STRATA_API_KEY` (#1344, the environment form of `--api-key`). Started that way with the SYCL engine, the server's environment reaches `strata-sycl.sh`, which passes every `STRATA_*` variable on as `docker run -e`. The key then sits in the container's config, readable by anyone who can run `docker inspect strata-sycl-serve` or read the docker command line in `ps`. The engine never reads it; only the Python server checks keys. **What it leaves alone:** every other forwarded variable, the defaults, the server, and the CUDA/HIP paths. A config's `"api_key"` field never reached the launcher, so nothing changes for it. **How it was checked:** - `docker` replaced by a stub that prints its arguments, `env -i` with `STRATA_API_KEY=k` set: on main the argument list holds `-e STRATA_API_KEY=k`; with this change it does not, and every other argument is identical (same sorted list). - On one Arc Pro B65 (xe driver), the same one-line exclusion has been in our launcher since 0.1.41: the server is started with `STRATA_API_KEY` exported, and `docker inspect` of the engine container shows neither the variable nor the key in its env or command, while the server still answers 401 without the key and 200 with it. **Not tested:** Windows (the SYCL launcher is Linux-only), two-card setups. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
本站相关内容
相关页面的快捷入口。