transcriber service still runs as root (missed by #489 non-root hardening)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- docker, python
- Domain
- devops, infrastructure, security
Research direction
Start with extern/transcriber.yaml and compare its transcriber service with the non-root vllm and reranker definitions described in the issue. Verify the transcriber uses the project-root Hugging Face cache and is covered by init-perms; done means it no longer writes under /root and matches the stack's non-root configuration.
Written by the indexing model from the issue text.
Description
Follow-up to #489 (Run OpenRAG as non-root (OpenShift compatible)).
The non-root hardening was applied to vllm (root compose), reranker (extern/reranker/infinity.yaml), etcd, minio, milvus, rdb, and openrag — but the transcriber service in extern/transcriber.yaml (included via ${TRANSCRIBER_COMPOSE}) was missed. It still runs as root and writes under /root.
Current state vs. its siblings
user: non-root |
HOME/HF_HOME/USER/LOGNAME |
cache mount | depends_on: init-perms |
|
|---|---|---|---|---|
| vllm (root compose) | ✅ | ✅ | ./.cache/huggingface → /cache |
✅ |
reranker (extern/reranker/) |
✅ | ✅ | ../../.cache/huggingface → /cache |
✅ |
transcriber (extern/) |
❌ | ❌ | /root/.cache/huggingface → /root/.cache/huggingface |
❌ |
Impact
- When the transcriber is enabled (
TRANSCRIBER_COMPOSE=extern/transcriber.yaml), it runs as root while the rest of the stack runs non-root — defeating the "whole stack non-root" goal of #489. - It writes to
/root/.cache/huggingface, so under OpenShift's restricted SCC (arbitrary UID, no write access to/root) the transcriber would fail to start. - Its cache bind-mount is never pre-chowned (
depends_on: init-permsmissing), and it doesn't share the project-root HF cache that vllm/reranker now use. - It's a vLLM-based image (Whisper), so it has the same
getpass.getuser()crash the PR addedUSER/LOGNAMEto vllm for.
Proposed fix (mirrors vllm)
Note the include-relative path: extern/transcriber.yaml lives in extern/, so the project-root cache is ../.cache/huggingface (vllm uses ./, reranker ../../).
services:
transcriber:
# Run unprivileged with a non-root user, matching the rest of the stack.
user: "${PUID:-1000}:${PGID:-1000}"
build:
context: .
dockerfile: ./vllm/Dockerfile.transcriber
runtime: nvidia
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
- HUGGING_FACE_HUB_TOKEN
- VLLM_MAX_AUDIO_CLIP_FILESIZE_MB=10000
# Run unprivileged: point HOME and the HF cache at the writable mounted
# volume so vllm never needs to write under root-owned /root.
- HOME=/cache
- HF_HOME=/cache/huggingface
# vllm calls getpass.getuser(); set USER/LOGNAME so it resolves without
# an /etc/passwd entry for the running UID.
- USER=openrag
- LOGNAME=openrag
ipc: "host"
volumes:
# This file is `include`d, so a relative default resolves relative to
# extern/. ../ points back at the project root so the cache matches
# vllm's and the dir init-perms chowns.
- ${VLLM_CACHE:-../.cache/huggingface}:/cache # HF + framework caches (HOME=/cache)
depends_on:
init-perms:
condition: service_completed_successfully
command: >
--model ${TRANSCRIBER_MODEL:-openai/whisper-large-v3-turbo}
--trust-remote-code
--gpu_memory_utilization 0.2
# ports:
# - ${TRANSCRIBER_PORT:-8002}:8000
cc @EnjoyBacon7
- Dominant language
- Python
- Stars
- 248
- Forks
- 57
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 71
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from linagora/openrag
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
security severity:low
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 Under an hour Newbie friendliness 68/100
All issues in linagora/openrag
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100