Skip to content

Commit

Permalink
Update clang
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale committed Dec 12, 2023
1 parent 1292d79 commit 578684f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 69 deletions.
1 change: 1 addition & 0 deletions scripts/ubuntu/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ packages=(
python3
python3-dev
python3-pip
software-properties-common
sudo
unzip
vim-nox
Expand Down
2 changes: 1 addition & 1 deletion ubuntu/20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ WORKDIR /opt
COPY ./scripts /opt/scripts

RUN ./scripts/ubuntu/setup.sh && \
./scripts/install-cmake-binary.sh
./scripts/install-cmake-binary.sh
22 changes: 5 additions & 17 deletions ubuntu/22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
FROM ubuntu:22.04@sha256:8eab65df33a6de2844c9aefd19efe8ddb87b7df5e9185a4ab73af936225685bb
FROM ubuntu:22.04

LABEL maintainer="@vsoch"
LABEL maintainer="Chris White <[email protected]>,@vsoch,David Beckingsale <[email protected]>"

ARG uptodate_github_commit_spack__spack__develop=5351382501e280838d148f15dfd485f2a78667f2
ENV spack_commit=${uptodate_github_commit_spack__spack__develop}
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Los_Angeles

# Add appropriate paths pointing to the view
ENV PATH=/opt/view/bin:/opt/spack/bin:$PATH \
MANPATH=/opt/view/share/man:$MANPATH \
PKG_CONFIG_PATH=/opt/view/lib/pkgconfig:/opt/view/lib64/pkgconfig:/opt/view/share/pkgconfig:$PKG_CONFIG_PATH \
CMAKE_PREFIX_PATH=/opt/view \
ACLOCAL_PATH=/opt/view/share/aclocal

WORKDIR /opt
COPY ./scripts /opt/scripts
# Install spack
RUN ./scripts/ubuntu/apt-install-defaults-plus-args.sh && \

RUN ./scripts/ubuntu/setup.sh && \
./scripts/install-cmake-binary.sh && \
./scripts/set-up-spack.sh
# Tell spack to use this one without arguments
# NOTE: this has to be here, setting it earlier will kill spack
ENV SPACK_ENV=/opt/env
add-apt-repository -y ppa:ubuntu-toolchain-r/test
7 changes: 3 additions & 4 deletions ubuntu/clang/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
ARG ubuntu_version
# FROM ghcr.io/llnl/ubuntu:$ubuntu_version
FROM ubuntu-base
FROM ghcr.io/llnl/ubuntu:$ubuntu_version

# Install llvm with spack
# ARG llvm_version
ENV llvm_version=12
ENV llvm_version=${llvm_version}

RUN \
sudo apt-get -qq update \
Expand All @@ -20,4 +19,4 @@ RUN \
&& sudo apt-get clean

USER radiuss
WORKDIR /home/radiuss
WORKDIR /home/radiuss
10 changes: 4 additions & 6 deletions ubuntu/clang/uptodate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,20 @@ dockerbuild:
# Specific combinations of build args to exclude (optional)
# Spack doesn't work with 14 nor 15
exclude:
llvm_version: ["14", "15"]
ubuntu_version: ["20.04", "20.04"]
llvm_version: ["13", "14", "15", "10", "11", "12"]
ubuntu_version: ["20.04", "20.04", "20.04", "22.04", "22.04", "22.04"]

build_args:
llvm_version:
key: llvm
versions:
- "10"
- "11"
- "12"
- "12" #20.04
- "13"
- "14"
- "15"
- "16"
- "15" #22.04

# Only support those in spack build cache
ubuntu_version:
key: ubuntu
versions:
Expand Down
58 changes: 17 additions & 41 deletions ubuntu/gcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
ARG ubuntu_version
FROM ghcr.io/rse-ops/ubuntu:$ubuntu_version

# Install gcc with spack
ARG gcc_version
ARG JOBS=2
ENV gcc_version=$gcc_version \
gcc_spec="gcc@${gcc_version}+bootstrap+strip+binutils languages=c,c++,fortran,lto" \
COMPILER_NAME=gcc \
COMPILER_VERSION=$gcc_version \
CC=/opt/view/bin/gcc \
CXX=/opt/view/bin/g++ \
FC=/opt/view/bin/gfortran \
CPP=/opt/view/bin/cpp

RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends gawk texinfo \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# build compiler and set defaults
# note the IFS to split the spec, spack can't tolerate a single-string spec with
# multiple flags components apparently
RUN spack external find hwloc ncurses gawk texinfo \
&& EXTRA_LANG=$(bash -c "[[ ${gcc_version} > 5 ]] && echo ',jit'" || true) \
&& spack spec --reuse ${gcc_spec}$EXTRA_LANG "^[email protected]:" \
&& spack mirror add develop https://binaries.spack.io/releases/develop \
&& spack buildcache keys --install --trust \
&& spack add ${gcc_spec} \
&& spack -v install --jobs $JOBS --deprecated \
&& spack compiler add \
&& spack config add "packages:all:compiler:[${COMPILER_NAME}@${COMPILER_VERSION}]" \
&& update-alternatives --install /usr/bin/cc cc ${CC} 50 \
&& update-alternatives --install /usr/bin/c++ c++ ${CXX} 50 \
&& update-alternatives --install /usr/bin/gcc gcc ${CC} 50 \
&& update-alternatives --install /usr/bin/g++ g++ ${CXX} 50 \
&& update-alternatives --install /usr/bin/gfortran gfortran ${FC} 50 \
&& update-alternatives --install /usr/bin/f77 f77 ${FC} 50 \
&& update-alternatives --install /usr/bin/f95 f95 ${FC} 50 \
&& update-alternatives --install /usr/bin/cpp cpp ${CPP} 50 \
&& update-alternatives --install /usr/bin/c89 c89 ${CC} 50 \
&& update-alternatives --install /usr/bin/c99 c99 ${CC} 50
#FROM ghcr.io/rse-ops/ubuntu:$ubuntu_version
FROM ubuntu-base
# ARG gcc_version
# ENV gcc_version=$gcc_version
ENV gcc_version=9

RUN \
sudo apt-get -qq update \
&& sudo apt-get -qq install -y --no-install-recommends \
g++-${gcc_version} \
&& sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 100 \
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 \
&& sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${gcc_version} 100 \
&& sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${gcc_version} 100 \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt-get clean

USER radiuss
WORKDIR /home/radiuss

0 comments on commit 578684f

Please sign in to comment.