Fix RapidOCR model download permission in local image
Grant appuser write access to rapidocr/models directory so OCR models can be downloaded at runtime.
This commit is contained in:
parent
48b7d5d3e8
commit
48c5e4ea6b
2 changed files with 4 additions and 2 deletions
|
|
@ -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 \
|
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
|
&& 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
|
ENV CONVERSION_ENGINE=local
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ COPY requirements-local.txt .
|
||||||
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \
|
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
|
&& 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
|
USER appuser
|
||||||
ENV CONVERSION_ENGINE=local
|
ENV CONVERSION_ENGINE=local
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue