From 4d5140e6952da983c801dfe98d2e9bed60347fb3 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 24 Mar 2017 00:09:10 -0700 Subject: [PATCH] no need for seperate numpy step. matplotlib brings it in --- Dockerfile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 77f392b3..7db9900f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,14 +24,13 @@ RUN docker-apt-install \ #pkg-config \ #python-dev \ -# install deps that don't depend on the code as the user -RUN mkdir /src \ - && chown abc:abc /src \ - && chroot --userspec=abc / pip install matplotlib numpy -# todo: do something to calculate font cache with matplotlib -# /home/joinmarket/pyenv/local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. - -# copy requirements before code. this will make the image builds faster when developing +# install deps that don't depend on the code as the user and fix /pyenv/local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. +# TODO: double check that this actually builds the font caches +RUN chroot --userspec=abc / pip install matplotlib==2.0.0 \ + && chroot --userspec=abc / python -c \ + "from matplotlib.font_manager import FontManager; print(FontManager())" + +# copy requirements before code. this will make the image builds faster when code changes but requirements don't COPY requirements.txt /src/ RUN chroot --userspec=abc / pip install -r /src/requirements.txt