Skip to content

Instantly share code, notes, and snippets.

@thomasvandoren
Last active March 21, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasvandoren/d0db347a8b610a0ed4a5ab06d6c4ab26 to your computer and use it in GitHub Desktop.
Save thomasvandoren/d0db347a8b610a0ed4a5ab06d6c4ab26 to your computer and use it in GitHub Desktop.
chapel-8850-pr-repro

python-chapel-docker

Repro python builds for chapel-lang/chapel#8850

git clone https://gist.github.com/d0db347a8b610a0ed4a5ab06d6c4ab26.git chapel-8850-pr-repro
cd chapel-8850-pr-repro
docker build -f Dockerfile.py2.7.14 .
docker build -f Dockerfile.py2.3.6 .

If you have previously built docker images, add --no-cache flag to docker build command.

FROM python:2.7.14
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
curl \
build-essential \
wget \
ca-certificates \
gcc \
g++ \
git \
perl \
python-dev \
python-setuptools \
libgmp10 \
libgmp-dev \
bash \
make \
mawk \
file \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/wolfcw/libfaketime /opt/libfaketime \
&& cd /opt/libfaketime \
&& make -j install \
&& true \
&& ls -l /usr/local/lib/faketime
RUN date \
&& export LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1 \
&& date \
&& FAKETIME=+1d date \
&& sleep 1 \
&& FAKETIME=+1d date
ENV CHPL_HOME /opt/chapel/$CHPL_VERSION
RUN mkdir -p /opt/chapel \
&& git clone https://github.com/thomasvandoren/chapel --branch 8756-venv /opt/chapel
ENV PATH $PATH:$CHPL_HOME/bin/linux64:$CHPL_HOME/util
RUN python --version \
&& python $CHPL_HOME/util/chplenv/chpl_python_version.py
RUN cd $CHPL_HOME/third-party/chpl-venv \
&& git checkout master \
&& make chpldoc-venv
ENV LD_PRELOAD /usr/local/lib/faketime/libfaketime.so.1
# This will pass, because cache dir is managed inside third-party/chpl-venv/...
RUN cd $CHPL_HOME/third-party/chpl-venv \
&& git checkout 8756-venv \
&& export FAKETIME=+24h \
&& date \
&& make clobber \
&& make chpldoc-venv \
&& echo "SUCCESS 🎉"
# This will fail, because it goes back to using system pip cache which was originally populated by older version of pip
RUN cd $CHPL_HOME/third-party/chpl-venv \
&& git checkout 7991b64838 \
&& export FAKETIME=+24h \
&& date \
&& make clobber \
&& make chpldoc-venv \
&& echo "SUCCESS 🎉"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment