From 48c5e4ea6bda45ab36ac40428ad18fdbece5de6a Mon Sep 17 00:00:00 2001 From: Pier-Jean Malandrino Date: Fri, 3 Apr 2026 10:44:20 +0200 Subject: [PATCH] Fix RapidOCR model download permission in local image Grant appuser write access to rapidocr/models directory so OCR models can be downloaded at runtime. --- Dockerfile | 3 ++- document-parser/Dockerfile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5b1597..ff3e37b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,5 +73,6 @@ COPY document-parser/requirements-local.txt . RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \ && pip install --no-cache-dir -r requirements-local.txt -RUN chown -R appuser:appuser /app +RUN chown -R appuser:appuser /app \ + && chown -R appuser:appuser /usr/local/lib/python3.12/site-packages/rapidocr/models ENV CONVERSION_ENGINE=local diff --git a/document-parser/Dockerfile b/document-parser/Dockerfile index bb63592..3c21f9a 100644 --- a/document-parser/Dockerfile +++ b/document-parser/Dockerfile @@ -50,6 +50,7 @@ COPY requirements-local.txt . RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \ && pip install --no-cache-dir -r requirements-local.txt -RUN chown -R appuser:appuser /app +RUN chown -R appuser:appuser /app \ + && chown -R appuser:appuser /usr/local/lib/python3.12/site-packages/rapidocr/models USER appuser ENV CONVERSION_ENGINE=local