From: amo13 Date: Sat, 14 Jan 2023 14:37:27 +0000 (+0100) Subject: Use correct canonical path for nltk_data X-Git-Tag: v1.12.0-beta.rc0~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4dbd58efd09fecfc1686befc4b7f99fe395f943;p=thirdparty%2Fpaperless-ngx.git Use correct canonical path for nltk_data --- diff --git a/Dockerfile b/Dockerfile index b616c70e72..687d993c75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -234,9 +234,9 @@ RUN set -eux \ && echo "Installing Python requirements" \ && python3 -m pip install --default-timeout=1000 --no-cache-dir --requirement requirements.txt \ && echo "Installing NLTK data" \ - && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" snowball_data \ - && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" stopwords \ - && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" punkt \ + && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" snowball_data \ + && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" stopwords \ + && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" punkt \ && echo "Cleaning up image" \ && apt-get -y purge ${BUILD_PACKAGES} \ && apt-get -y autoremove --purge \ diff --git a/docs/configuration.md b/docs/configuration.md index 1b361f9aa6..873db795ee 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -179,7 +179,7 @@ Previously, the location defaulted to `PAPERLESS_DATA_DIR/nltk`. Unless you are using this in a bare metal install or other setup, this folder is no longer needed and can be removed manually. -Defaults to `/usr/local/share/nltk_data` +Defaults to `/usr/share/nltk_data` ## Logging diff --git a/src/paperless/settings.py b/src/paperless/settings.py index 79a7a553b7..c5bb4801c0 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -178,7 +178,7 @@ THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails") DATA_DIR = __get_path("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data")) -NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/local/share/nltk_data") +NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/share/nltk_data") TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR")