-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to switch to apt based builds
- Loading branch information
1 parent
c3ba0f3
commit 1292d79
Showing
10 changed files
with
61 additions
and
194 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
49 changes: 28 additions & 21 deletions
49
.../ubuntu/apt-install-defaults-plus-args.sh → scripts/ubuntu/setup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters