Skip to content

Commit 6ec30c2

Browse files
remove pyenv bootstrapping from travis_ci/Dockerfile (#7505)
### Problem The conclusion of #7064 was, after `pantsbuild/centos6:latest` was updated, to remove the pyenv bootstrapping in `travis_ci/Dockerfile` as it was now being done in the centos6 base image. ### Solution - Remove the marked section. ### Result This will speed up all Docker shards that had Py3 installed by 2-3 minutes. So, Linux build engine Py36 and Linux build wheels abi3. This means overall CI is about 5 minutes faster, and the bootstrap stage 2-3 minutes faster, which is especially significant since that blocks starting other tests. Finally, this means everywhere we run Pants in CI, we have Python 3 installed now (instead of having to install it again!).
1 parent 454ce5e commit 6ec30c2

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

build-support/docker/travis_ci/Dockerfile

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,6 @@
55
ARG BASE_IMAGE=pantsbuild/centos6:latest
66
FROM ${BASE_IMAGE}
77

8-
# TODO(7064) These changes belong in centos6/Dockerfile, because we always want that image to
9-
# have Py3 available and also avoid the cost of rebuilding Python 3 every time in CI. However,
10-
# this requires publishing an updated image to Docker hub, so we copy the code here until then.
11-
12-
### BEGIN CENTOS6 DOCKERFILE CHANGES
13-
RUN yum -y update
14-
# TODO: figure out why this needs to be installed first for /usr/bin/scl to work!
15-
RUN yum install -y centos-release-scl
16-
RUN yum install -y \
17-
bzip2-devel \
18-
devtoolset-7-gcc{,-c++} \
19-
git \
20-
java-1.8.0-openjdk-devel \
21-
libffi-devel \
22-
openssl-devel \
23-
readline-devel \
24-
sqlite-devel \
25-
zlib-devel
26-
27-
ARG PYTHON_27_VERSION=2.7.13
28-
ARG PYTHON_36_VERSION=3.6.8
29-
# NB: PYENV_ROOT must be set for `pyenv install` to be available. This failure mode is not mentioned
30-
# in https://github.com/pyenv/pyenv#basic-github-checkout.
31-
ENV PYENV_ROOT "${PYENV_ROOT:-/pyenv-docker-build}"
32-
ENV PYENV_BIN "${PYENV_ROOT}/bin/pyenv"
33-
ENV PYTHON_CONFIGURE_OPTS="--enable-shared"
34-
RUN if [[ ! -d "${PYENV_ROOT}" ]]; then \
35-
git clone https://github.com/pyenv/pyenv ${PYENV_ROOT} \
36-
&& /usr/bin/scl enable devtoolset-7 -- ${PYENV_BIN} install ${PYTHON_27_VERSION} \
37-
&& /usr/bin/scl enable devtoolset-7 -- ${PYENV_BIN} install ${PYTHON_36_VERSION} \
38-
&& ${PYENV_BIN} global ${PYTHON_27_VERSION} ${PYTHON_36_VERSION}; \
39-
fi
40-
ENV PATH "${PYENV_ROOT}/shims:${PATH}"
41-
42-
# Expose the installed gcc to the invoking shell.
43-
ENTRYPOINT ["/usr/bin/scl", "enable", "devtoolset-7", "--"]
44-
45-
### END CENTOS6 DOCKERFILE CHANGES
46-
478
ARG TRAVIS_HOME_DIR_PATH=/travis/home
489
ARG TRAVIS_WORK_DIR_PATH=/travis/workdir
4910

0 commit comments

Comments
 (0)