From 4c1e6386a2cdaa54ad2e786bb03fc9e372fe4f89 Mon Sep 17 00:00:00 2001 From: Tom Bursch Date: Sun, 24 Nov 2024 14:29:41 +0100 Subject: [PATCH] fix: Update nltk data download --- Dockerfile | 2 +- backend/Dockerfile | 2 +- backend/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0305e0d1..aff04646 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,7 +69,7 @@ ENV PATH="/opt/venv/bin:$PATH" COPY backend/requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt && find /opt/venv \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \+ -RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger', download_dir='/opt/venv/nltk_data')" +RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='/opt/venv/nltk_data')" # ------------ # RUNNER diff --git a/backend/Dockerfile b/backend/Dockerfile index c0cb7c50..e6cc90d7 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -16,7 +16,7 @@ ENV PATH="/opt/venv/bin:$PATH" COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt && find /opt/venv \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \+ -RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger', download_dir='/opt/venv/nltk_data')" +RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='/opt/venv/nltk_data')" # ------------ # RUNNER diff --git a/backend/README.md b/backend/README.md index 17e44b44..a6ec2e4f 100644 --- a/backend/README.md +++ b/backend/README.md @@ -10,7 +10,7 @@ Take a look at the general contribution rules [here](../CONTRIBUTING.md). - Create a python environment `python3 -m venv venv` - Activate your python environment `source venv/bin/activate` (environment can be deactivated with `deactivate`) - Install dependencies `pip3 install -r requirements.txt` -- Initialize/Upgrade requirements for the recipe scraper `python -c "import nltk; nltk.download('averaged_perceptron_tagger', download_dir='./venv/nltk_data')"` +- Initialize/Upgrade requirements for the recipe scraper `python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='./venv/nltk_data')"` - Initialize/Upgrade the SQLite database with `flask db upgrade` - Run debug server with `python3 wsgi.py` or without debugging `flask run` - The backend should be reachable at `localhost:5000`