Skip to content

Commit

Permalink
Install sccache for all images + env var
Browse files Browse the repository at this point in the history
  • Loading branch information
TotoGaz authored Oct 16, 2023
1 parent fe0ec90 commit 4d28cc2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docker/Stanford/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ RUN yum -y install \
git

RUN curl -fsSL https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip | zcat > /usr/local/bin/ninja && chmod +x /usr/local/bin/ninja

RUN mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf -
ENV SCCACHE=/opt/sccache/bin/sccache
4 changes: 4 additions & 0 deletions docker/TotalEnergies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ RUN yum -y install \
git

RUN curl -fsSL https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip | zcat > /usr/local/bin/ninja && chmod +x /usr/local/bin/ninja

RUN mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf -
ENV SCCACHE=/opt/sccache/bin/sccache
4 changes: 4 additions & 0 deletions docker/clang-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@ RUN apt-get install -y --no-install-recommends \
texlive \
graphviz \
ninja-build

RUN mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf -
ENV SCCACHE=/opt/sccache/bin/sccache
4 changes: 4 additions & 0 deletions docker/gcc-cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ RUN yum install -y \
git

RUN curl -fsSL https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip | zcat > /usr/local/bin/ninja && chmod +x /usr/local/bin/ninja

RUN mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf -
ENV SCCACHE=/opt/sccache/bin/sccache
15 changes: 10 additions & 5 deletions docker/gcc-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,23 @@ FROM tpl_toolchain_intersect_geosx_toolchain AS geosx_toolchain
# I extract the deployed TPLs from the TPL building stqge.
COPY --from=tpl_toolchain ${GEOSX_TPL_DIR} ${GEOSX_TPL_DIR}

# Install `sccache` binaries to speed up the build of `geos`.
RUN apt-get install -y --no-install-recommends curl ca-certificates && \
mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf - && \
apt-get purge --auto-remove -y curl
# Any tool specific to building GEOSX shall be installed in this stage.
RUN apt-get install -y --no-install-recommends \
openssh-client \
# `ca-certificates` is needed by `sccache` to download the cached compilations.
ca-certificates \
texlive \
texlive-latex-extra \
graphviz \
libxml2-utils \
git \
ghostscript \
ninja-build

# Install `sccache` binaries to speed up the build of `geos`.
RUN apt-get install -y --no-install-recommends curl && \
mkdir -p /opt/sccache/bin && \
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.5.4/sccache-v0.5.4-x86_64-unknown-linux-musl.tar.gz | tar --directory=/opt/sccache/bin --strip-components=1 -xzf - && \
apt-get purge --auto-remove -y curl
# This environment variable is meant to be used instead of an hard-coded path.
ENV SCCACHE=/opt/sccache/bin/sccache

0 comments on commit 4d28cc2

Please sign in to comment.