diff --git a/Dockerfile b/Dockerfile index b4e9335..885dc89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,5 @@ RUN apt update -y && \ rm -rf /var/lib/apt/lists/* COPY . /home/spam-filter/. EXPOSE 9090 -CMD ["python", "/home/spam-filter/configuration/scripts/nltk.py"] +CMD ["python", "/home/spam-filter/configuration/scripts/nltk_package_downloads.py"] CMD ["python", "/home/spam-filter/src/main.py"] \ No newline at end of file diff --git a/configuration/scripts/nltk.py b/configuration/scripts/nltk.py deleted file mode 100644 index c6243a8..0000000 --- a/configuration/scripts/nltk.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python - -import nltk - -nltk.download('punkt') -nltk.download('stopwords') \ No newline at end of file diff --git a/configuration/scripts/nltk_package_downloads.py b/configuration/scripts/nltk_package_downloads.py new file mode 100644 index 0000000..b9d0a9a --- /dev/null +++ b/configuration/scripts/nltk_package_downloads.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +import nltk + +if __name__ == '__main__': + nltk.download('punkt') + nltk.download('stopwords') \ No newline at end of file