Skip to content

Commit

Permalink
Starting to switch to apt based builds
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale committed Dec 12, 2023
1 parent c3ba0f3 commit 1292d79
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 194 deletions.
25 changes: 0 additions & 25 deletions alpine/3.14/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions alpine/uptodate.yaml

This file was deleted.

Binary file removed img/rse-ops-docker.png
Binary file not shown.
40 changes: 0 additions & 40 deletions scripts/set-up-spack.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,43 +1,50 @@
#!/bin/bash
set -euo pipefail
set -x

packages=(
# fetchers
binutils-dev
build-essential
bzip2
ca-certificates
curl
git
wget
# interactive tools
valgrind
vim-nox
# build stuff
build-essential
dh-autoreconf
git
gnupg2
hwloc-nox
lbzip2
lcov
libbinutils
libbz2-dev
libhwloc-dev
liblzma-dev
libssl-dev
libzip-dev
meson
ninja-build
pkg-config
python3
python3-pip
python3-dev
python3-pip
sudo
xsltproc
# common build deps
libbinutils
binutils-dev
hwloc-nox
libhwloc-dev
libssl-dev
lbzip2
libbz2-dev
libzip-dev
liblzma-dev
bzip2
unzip
vim-nox
wget
xsltproc
)

apt-get -qq update
apt-get -qq install -fy tzdata
apt-get -qq install -y --no-install-recommends "${packages[@]}" "$@"
rm -rf /var/lib/apt/lists/*
apt-get clean

# Install Clingo for Spack
python3 -m pip install --upgrade pip
python3 -m pip install clingo

# Setup radiuss user
useradd -ms /bin/bash radiuss
printf "radiuss:radiuss" | chpasswd
adduser radiuss sudo
printf "radiuss ALL= NOPASSWD: ALL\\n" >> /etc/sudoers
21 changes: 4 additions & 17 deletions ubuntu/20.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
FROM ubuntu:20.04@sha256:f5c3e53367f142fab0b49908550bdcdc4fb619d2f61ec1dfa60d26e0d59ac9e7

LABEL maintainer="Chris White <[email protected]>,@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 && \
./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

RUN ./scripts/ubuntu/setup.sh && \
./scripts/install-cmake-binary.sh
25 changes: 0 additions & 25 deletions ubuntu/23.04/Dockerfile

This file was deleted.

25 changes: 0 additions & 25 deletions ubuntu/24.04/Dockerfile

This file was deleted.

43 changes: 19 additions & 24 deletions ubuntu/clang/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
ARG ubuntu_version
FROM ghcr.io/rse-ops/ubuntu:$ubuntu_version
# FROM ghcr.io/llnl/ubuntu:$ubuntu_version
FROM ubuntu-base

# Install llvm with spack
ARG llvm_version
ENV llvm_version=$llvm_version
ENV llvm_spec="llvm@${llvm_version}+llvm_dylib+link_llvm_dylib~split_dwarf~lldb~polly build_type=MinSizeRel" \
# these are safe here only because spack ignores them
COMPILER_NAME=clang \
COMPILER_VERSION=$llvm_version \
CC=/opt/view/bin/clang \
CXX=/opt/view/bin/clang++ \
CPP=/opt/view/bin/clang-cpp
# ARG llvm_version
ENV llvm_version=12

# build compiler and set defaults
RUN spack external find hwloc ncurses \
&& spack spec --reuse "${llvm_spec}" \
&& spack add "${llvm_spec}" \
&& spack mirror add develop https://binaries.spack.io/releases/develop \
&& spack buildcache keys --install --trust \
&& spack install --fail-fast \
&& 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/cpp cpp ${CPP} 50 \
&& update-alternatives --install /usr/bin/c89 c89 ${CC} 50 \
&& update-alternatives --install /usr/bin/c99 c99 ${CC} 50
RUN \
sudo apt-get -qq update \
&& sudo apt-get -qq install -y --no-install-recommends \
clang-${llvm_version} clang-format-${llvm_version} llvm-${llvm_version} \
&& sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${llvm_version} 100 \
&& sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${llvm_version} 100 \
&& sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${llvm_version} 100 \
&& sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${llvm_version} 100 \
&& sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${llvm_version} 100 \
&& sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${llvm_version} 100 \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo apt-get clean

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

build_args:
llvm_version:
key: llvm
name: llvm
type: spack

# Only install x.0.0 versions
filter:
- "^[0-9]+[.]0[.]0$"

# Greater than 10.0.0
startat: "10.0.0"
versions:
- "10"
- "11"
- "12"
- "13"
- "14"
- "15"
- "16"

# Only support those in spack build cache
ubuntu_version:
key: ubuntu
versions:
- "20.04"
- "22.04"

0 comments on commit 1292d79

Please sign in to comment.