Tag: nltk dockerfile

如何创build在Ubuntu容器中安装Python 3和nltk的Dockerfile?

我正在尝试使用python 3和nltk tokenizer创build一个Docker容器。 任何人都可以帮助我创buildDockerfile。

无法在Docker中安装nltk

我想在docker上安装nltk包,下面是我的docker文件 FROM python:3-onbuild # COPY startup script into known file location in container COPY start.sh /start.sh RUN python -m libs.py # EXPOSE port 8000 to allow communication to/from server EXPOSE 8000 # CMD specifcies the command to execute to start the server running. CMD ["/start.sh"] # done! libs.py包含nltk包,在requirements.txt中安装了nltk == 3.2.5 import nltk nltk.data.path('libs/') nltk.download('wordnet') nltk.download('pros_cons') […]