Q:

Docker: Download all from nltk in Dockerfile

How would I achieve the following in a Dockerfile:
sudo python
import nltk
nltk.download('all')

A:

You can build a custom Docker image with everything you need:
FROM python:3.6-slim
RUN pip3 install nltk
RUN [ "python", "-c", "import nltk; nltk.download('all')" ]
ENTRYPOINT python

Then build:
docker build -t docker-nltk .

And run:
docker run -it docker-nltk

