docker上的Matplotlibbuild设
我有一个Python的应用程序,我想创build一个泊坞窗图像。 该应用程序在我的电脑上正常工作,但是当我创build一个泊坞窗图像时,我得到这个警告:
UserWarning:Matplotlib正在使用fc-list构build字体caching。 这可能需要一些时间。 warnings.warn('Matplotlib正在使用fc-list构build字体caching,这可能需要一些时间。')
之后,我稍等一下,程序崩溃,因为有一个float division by zero
。 这从来没有发生在个人电脑上。
当在我的电脑上testing时,我有一个环境激活,我只是点击pip freeze > requirements.txt
所以我知道一切都被导入。 我正在使用matplotlib 1.5.3
。
我已经看到了删除~/.cache/matplotlib/fontList.cache
和~/.matplotlib
的解决scheme,但我不能这样做到一个泊坞窗图像。
有没有人有什么build议?
我有一个Dockfile
,在它旁边有一个我的程序文件夹(和其他一些我需要的文件),我用hello.py
启动程序。 从hello.py
我开始使用matplotlib的子hello.py
。
Dockfile:
FROM continuumio/anaconda:4.2.0 MAINTAINER Milos Radosavljevic "kemis93@gmail.com" RUN apt-get install -y build-essential libblas-dev liblapack-dev RUN pip install --upgrade pip WORKDIR /charts COPY charts/requirements.txt charts/ RUN pip install -r charts/requirements.txt COPY charts /charts ENTRYPOINT ["python"] CMD ["hello.py"] EXPOSE 5000
requirements.txt:
click==6.6 cycler==0.10.0 DateTime==4.1.1 decorator==4.0.10 docutils==0.13.1 entrypoints==0.2.2 et-xmlfile==1.0.1 Flask==0.11.1 itsdangerous==0.24 jdcal==1.3 Jinja2==2.8 MarkupSafe==0.23 matplotlib==1.5.3 numexpr==2.6.1 numpy==1.11.2 openpyxl==2.4.1 pandas==0.19.1 pyparsing==2.1.10 python-dateutil==2.6.0 pytz==2016.10 scipy==0.18.1 seaborn==0.7.1 six==1.10.0 statistics==1.0.3.5 tables==3.3.0 Werkzeug==0.11.11 xlrd==1.0.0 zope.interface==4.3.3