Skip to content

Instantly share code, notes, and snippets.

@jaraco
Last active December 7, 2017 15:11
Show Gist options
  • Save jaraco/a7877d3bca06dac12cb840da187a6aba to your computer and use it in GitHub Desktop.
Save jaraco/a7877d3bca06dac12cb840da187a6aba to your computer and use it in GitHub Desktop.
Dockerfile reproducer for pypa/setuptools#1229
FROM ubuntu:xenial
# general environment for docker
ENV DEBIAN_FRONTEND=noninteractive \
FORCE_UNSAFE_CONFIGURE=1
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
build-essential \
pkg-config \
libc6-dev \
python-minimal \
python-dev \
python-pip \
ca-certificates \
poppler-utils \
coreutils \
curl \
git \
lsb-release \
wget \
&& rm -rf /var/lib/apt/lists/*
# this is the "SYSTEM-WIDE" install of python and cython
RUN pip install setuptools --user --no-binary :all:
RUN pip install cython --user --no-binary :all:
RUN python --version && which python
RUN /root/.local/bin/cython --version
# here starts the "USER-SCOPE": either in $HOME, conda, a virtual env, or e.g. spack
RUN wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh && \
chmod +x miniconda.sh && \
./miniconda.sh -b && \
ls
RUN git clone --depth 10 https://github.com/matplotlib/matplotlib.git
ENV PYTHONUSERBASE=/dev/null
RUN /root/miniconda2/bin/conda create -y -p /tmp/py27 python=2.7 && \
/bin/bash -l -c "source /root/miniconda2/bin/activate /tmp/py27 && \
/root/miniconda2/bin/conda install -y gcc libgcc=4.8.5 numpy pkgconfig libpng freetype && \
cd matplotlib && \
which python && \
python setup.py build && \
python setup.py install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment