Merge pull request #289 from danielballan/mpl-fc-list

Build matplotlib font cache during docker build.
This commit is contained in:
Peter Parente
2016-09-28 15:25:30 -04:00
committed by GitHub

View File

@@ -74,6 +74,10 @@ RUN conda create --quiet --yes -p $CONDA_DIR/envs/python2 python=2.7 \
RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \
ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3
# Import matplotlib the first time to build the font cache.
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
RUN MPLBACKEND=Agg $CONDA_DIR/envs/python2/bin/python -c "import matplotlib.pyplot"
# Configure ipython kernel to use matplotlib inline backend by default
RUN mkdir -p $HOME/.ipython/profile_default/startup
COPY mplimporthook.py $HOME/.ipython/profile_default/startup/