From cf5089f480c9ea116d42e1d79c881efbff5b824c Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 21 Oct 2019 11:14:53 -0400 Subject: [PATCH 1/4] centos7 image --- .travis.yml | 5 ++ linux-anvil-cos7-comp7/Dockerfile | 59 ++++++++++++++++++++++++ linux-anvil-cos7-comp7/entrypoint_source | 2 + 3 files changed, 66 insertions(+) create mode 100644 linux-anvil-cos7-comp7/Dockerfile create mode 100644 linux-anvil-cos7-comp7/entrypoint_source diff --git a/.travis.yml b/.travis.yml index 2f838f00..75f7b0a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,11 @@ matrix: - DOCKERIMAGE=linux-anvil-comp7 - DOCKERTAG=jnlp-slave + - os: linux + env: + - DOCKERIMAGE=linux-anvil-cos7-comp7 + - DOCKERTAG=latest + - os: linux env: - DOCKERIMAGE=linux-anvil-ppc64le diff --git a/linux-anvil-cos7-comp7/Dockerfile b/linux-anvil-cos7-comp7/Dockerfile new file mode 100644 index 00000000..631bb1ba --- /dev/null +++ b/linux-anvil-cos7-comp7/Dockerfile @@ -0,0 +1,59 @@ +FROM centos:7 + +LABEL maintainer="conda-forge " + +# Set an encoding to make things work smoothly. +ENV LANG en_US.UTF-8 + +# Add a timestamp for the build. Also, bust the cache. +ADD http://worldclockapi.com/api/json/utc/now /opt/docker/etc/timestamp + +# Resolves a nasty NOKEY warning that appears when using yum. +RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +# Install basic requirements. +COPY scripts/yum_clean_all /opt/docker/bin/ +RUN yum update -y && \ + yum install -y \ + bzip2 \ + sudo \ + tar \ + which && \ + /opt/docker/bin/yum_clean_all + +# Run common commands +COPY scripts/run_commands /opt/docker/bin/run_commands +RUN /opt/docker/bin/run_commands + +# Download and cache new compiler packages. +# Should speedup installation of them on CIs. +RUN source /opt/conda/etc/profile.d/conda.sh && \ + conda activate && \ + conda create -n test --yes --quiet --download-only \ + defaults::binutils_impl_linux-64 \ + defaults::binutils_linux-64 \ + conda-forge::gcc_impl_linux-64 \ + conda-forge::gcc_linux-64 \ + defaults::gfortran_impl_linux-64 \ + defaults::gfortran_linux-64 \ + conda-forge::gxx_impl_linux-64 \ + conda-forge::gxx_linux-64 \ + defaults::libgcc-ng \ + defaults::libgfortran-ng \ + defaults::libstdcxx-ng && \ + conda remove --yes --quiet -n test --all && \ + conda clean -tiy && \ + chgrp -R lucky /opt/conda && \ + chmod -R g=u /opt/conda + +# Add a file for users to source to activate the `conda` +# environment `base`. Also add a file that wraps that for +# use with the `ENTRYPOINT`. +COPY linux-anvil-cos7-comp7/entrypoint_source /opt/docker/bin/entrypoint_source +COPY scripts/entrypoint /opt/docker/bin/entrypoint + +# Ensure that all containers start with tini and the user selected process. +# Activate the `conda` environment `base` and the devtoolset compiler. +# Provide a default command (`bash`), which will start if the user doesn't specify one. +ENTRYPOINT [ "/opt/conda/bin/tini", "--", "/opt/docker/bin/entrypoint" ] +CMD [ "/bin/bash" ] diff --git a/linux-anvil-cos7-comp7/entrypoint_source b/linux-anvil-cos7-comp7/entrypoint_source new file mode 100644 index 00000000..6dfd4211 --- /dev/null +++ b/linux-anvil-cos7-comp7/entrypoint_source @@ -0,0 +1,2 @@ +# Activate the `base` conda environment. +conda activate base From 1c8e09024ab9b03210baa0e4b4f30c4b4e0e300b Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 21 Oct 2019 12:00:07 -0400 Subject: [PATCH 2/4] centos7 image updates --- .travis.yml | 2 +- {linux-anvil-cos7-comp7 => linux-anvil-cos7}/Dockerfile | 2 +- {linux-anvil-cos7-comp7 => linux-anvil-cos7}/entrypoint_source | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {linux-anvil-cos7-comp7 => linux-anvil-cos7}/Dockerfile (96%) rename {linux-anvil-cos7-comp7 => linux-anvil-cos7}/entrypoint_source (100%) diff --git a/.travis.yml b/.travis.yml index 75f7b0a0..21a1780c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ matrix: - os: linux env: - - DOCKERIMAGE=linux-anvil-cos7-comp7 + - DOCKERIMAGE=linux-anvil-cos7 - DOCKERTAG=latest - os: linux diff --git a/linux-anvil-cos7-comp7/Dockerfile b/linux-anvil-cos7/Dockerfile similarity index 96% rename from linux-anvil-cos7-comp7/Dockerfile rename to linux-anvil-cos7/Dockerfile index 631bb1ba..9f48d346 100644 --- a/linux-anvil-cos7-comp7/Dockerfile +++ b/linux-anvil-cos7/Dockerfile @@ -49,7 +49,7 @@ RUN source /opt/conda/etc/profile.d/conda.sh && \ # Add a file for users to source to activate the `conda` # environment `base`. Also add a file that wraps that for # use with the `ENTRYPOINT`. -COPY linux-anvil-cos7-comp7/entrypoint_source /opt/docker/bin/entrypoint_source +COPY linux-anvil-cos7/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. diff --git a/linux-anvil-cos7-comp7/entrypoint_source b/linux-anvil-cos7/entrypoint_source similarity index 100% rename from linux-anvil-cos7-comp7/entrypoint_source rename to linux-anvil-cos7/entrypoint_source From 9ae23d8e229060fed5595240df092489349e77c7 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Mon, 21 Oct 2019 13:37:28 -0400 Subject: [PATCH 3/4] update name again --- .travis.yml | 2 +- {linux-anvil-cos7 => linux-anvil-cos7-x86_64}/Dockerfile | 2 +- {linux-anvil-cos7 => linux-anvil-cos7-x86_64}/entrypoint_source | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {linux-anvil-cos7 => linux-anvil-cos7-x86_64}/Dockerfile (96%) rename {linux-anvil-cos7 => linux-anvil-cos7-x86_64}/entrypoint_source (100%) diff --git a/.travis.yml b/.travis.yml index 21a1780c..f0986a65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ matrix: - os: linux env: - - DOCKERIMAGE=linux-anvil-cos7 + - DOCKERIMAGE=linux-anvil-cos7-x86_64 - DOCKERTAG=latest - os: linux diff --git a/linux-anvil-cos7/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile similarity index 96% rename from linux-anvil-cos7/Dockerfile rename to linux-anvil-cos7-x86_64/Dockerfile index 9f48d346..2513633b 100644 --- a/linux-anvil-cos7/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -49,7 +49,7 @@ RUN source /opt/conda/etc/profile.d/conda.sh && \ # Add a file for users to source to activate the `conda` # environment `base`. Also add a file that wraps that for # use with the `ENTRYPOINT`. -COPY linux-anvil-cos7/entrypoint_source /opt/docker/bin/entrypoint_source +COPY linux-anvil-cos7-x86_64/entrypoint_source /opt/docker/bin/entrypoint_source COPY scripts/entrypoint /opt/docker/bin/entrypoint # Ensure that all containers start with tini and the user selected process. diff --git a/linux-anvil-cos7/entrypoint_source b/linux-anvil-cos7-x86_64/entrypoint_source similarity index 100% rename from linux-anvil-cos7/entrypoint_source rename to linux-anvil-cos7-x86_64/entrypoint_source From 211b09dca994ae806cdffe4939d6f2cfaef94447 Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Tue, 22 Oct 2019 13:32:18 -0400 Subject: [PATCH 4/4] update compiler --- linux-anvil-cos7-x86_64/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-anvil-cos7-x86_64/Dockerfile b/linux-anvil-cos7-x86_64/Dockerfile index 2513633b..1c46f047 100644 --- a/linux-anvil-cos7-x86_64/Dockerfile +++ b/linux-anvil-cos7-x86_64/Dockerfile @@ -30,12 +30,12 @@ RUN /opt/docker/bin/run_commands RUN source /opt/conda/etc/profile.d/conda.sh && \ conda activate && \ conda create -n test --yes --quiet --download-only \ - defaults::binutils_impl_linux-64 \ - defaults::binutils_linux-64 \ + conda-forge::binutils_impl_linux-64 \ + conda-forge::binutils_linux-64 \ conda-forge::gcc_impl_linux-64 \ conda-forge::gcc_linux-64 \ - defaults::gfortran_impl_linux-64 \ - defaults::gfortran_linux-64 \ + conda-forge::gfortran_impl_linux-64 \ + conda-forge::gfortran_linux-64 \ conda-forge::gxx_impl_linux-64 \ conda-forge::gxx_linux-64 \ defaults::libgcc-ng \