[09.10.20] NLTK packages to dockerfile

This commit is contained in:
andrewso 2020-10-09 18:21:54 +01:00
parent 1ba25e17f9
commit 8977ba6332
2 changed files with 8 additions and 0 deletions

View File

@ -6,5 +6,6 @@ RUN python -m pip install --upgrade pip
RUN pip install utils pycryptodome && \ RUN pip install utils pycryptodome && \
pip install python-dotenv schedule tweepy stomp.py python-json-logger pip install python-dotenv schedule tweepy stomp.py python-json-logger
COPY . /home/tweet-collector/. COPY . /home/tweet-collector/.
RUN python3 /home/spam-filter/configuration/scripts/nltk_package_downloads.py
EXPOSE 9090 EXPOSE 9090
CMD ["python", "/home/tweet-collector/src/main.py"] CMD ["python", "/home/tweet-collector/src/main.py"]

View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
import nltk
if __name__ == '__main__':
nltk.download('wordpunct_tokenize')
nltk.download('stopwords')