mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 15:32:56 +00:00
Merge pull request #289 from danielballan/mpl-fc-list
Build matplotlib font cache during docker build.
This commit is contained in:
@@ -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 && \
|
RUN ln -s $CONDA_DIR/envs/python2/bin/pip $CONDA_DIR/bin/pip2 && \
|
||||||
ln -s $CONDA_DIR/bin/pip $CONDA_DIR/bin/pip3
|
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
|
# Configure ipython kernel to use matplotlib inline backend by default
|
||||||
RUN mkdir -p $HOME/.ipython/profile_default/startup
|
RUN mkdir -p $HOME/.ipython/profile_default/startup
|
||||||
COPY mplimporthook.py $HOME/.ipython/profile_default/startup/
|
COPY mplimporthook.py $HOME/.ipython/profile_default/startup/
|
||||||
|
Reference in New Issue
Block a user