security(ocr): redirect XDG cache and Torch home away from read-only HOME

Prevents PyTorch/Matplotlib/Ketos from writing to /home/ocr which is
on the read-only container filesystem — fixes Nora's blocker. Also
restores the explanatory comment on the ocr_cache volume mount.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-05-17 17:30:39 +02:00
parent eb63df2000
commit fc8b4b164b
2 changed files with 5 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ RUN chmod +x /app/entrypoint.sh
ENV HOME=/home/ocr
ENV HF_HOME=/app/cache
ENV XDG_CACHE_HOME=/app/cache
ENV TORCH_HOME=/app/models/torch
USER ocr