From 9925db192565241de840bf7737ca2feb4d9a0cd5 Mon Sep 17 00:00:00 2001 From: andrewso <9V5f1FkzI2LD> Date: Fri, 6 Mar 2020 11:33:58 +0000 Subject: [PATCH] [06.03.20] nltk downloads --- Dockerfile | 3 ++- configuration/scripts/nltk.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 configuration/scripts/nltk.py diff --git a/Dockerfile b/Dockerfile index 01cfc0a..ede3b72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ MAINTAINER Andrew Sotheran RUN apt update -y && \ apt install -y python3-pip && \ pip3 install nltk numpy sklearn flask pandas && \ - rm -rf /var/lib/apt/lists/* + 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/src/main.py"] \ No newline at end of file diff --git a/configuration/scripts/nltk.py b/configuration/scripts/nltk.py new file mode 100644 index 0000000..df69da2 --- /dev/null +++ b/configuration/scripts/nltk.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +import nltk + +nltk.download('pubkt') +nltk.download('stopwords') \ No newline at end of file