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