Skip to content

Commit 6e0957b

Browse files
authored
Fix NLTK data PermissionError in Docker (#4575)
1 parent 32fc459 commit 6e0957b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ ENV LIBRARY_PATH=/lib:/usr/lib LD_LIBRARY_PATH=/lib:/usr/lib
7373
RUN apt-get update -y && apt-get install -y curl
7474

7575
RUN groupadd -r app && useradd -r -g app app && mkdir -p ${FUNCTION_DIR} && chown -R app:app ${FUNCTION_DIR} \
76-
&& mkdir -p /home/app/.cache/huggingface && chown -R app:app /home/app/.cache
76+
&& mkdir -p /home/app/.cache/huggingface /home/app/nltk_data && chown -R app:app /home/app/.cache /home/app/nltk_data
7777

7878
ENV HF_HOME=/home/app/.cache/huggingface
79+
ENV NLTK_DATA=/home/app/nltk_data
7980

8081
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/
8182
COPY --chown=app:app --from=js-stage ${FUNCTION_DIR}/dist/widgets/*.html ${FUNCTION_DIR}/custom_admin/templates/astro/widgets/

0 commit comments

Comments
 (0)