Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,34 @@ on:

jobs:
containers:
name: Update container images
name: Update CI container images
runs-on: ubuntu-latest
if: ${{ github.repository == 'lanl/qmd-progress' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/[email protected]
- name: Build and push default Docker image
uses: docker/build-push-action@v2
id: docker_build
with:
context: .
file: Dockerfile
push: true
tags: nicolasbock/qmd-progress:latest
- name: Build and push experimental Focal Docker image
uses: docker/build-push-action@v2
id: docker_build_focal
with:
context: .
file: Dockerfile-focal
push: true
tags: nicolasbock/qmd-progress:focal
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: |
echo "Default image: ${{ steps.docker_build.outputs.digest }}"
echo "Focal image: ${{ steps.docker_build_focal.outputs.digest }}"
14 changes: 14 additions & 0 deletions Dockerfile-focal
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:focal
MAINTAINER [email protected]

COPY prepare-container-focal.sh /usr/sbin
RUN /usr/sbin/prepare-container-focal.sh
COPY scripts/install-bml.sh /usr/sbin

ENV CC gcc-10
ENV CXX g++-10
ENV FC gfortran-10
ENV CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Debug}
RUN INSTALL_DIR=/usr /usr/sbin/install-bml.sh

WORkDIR /root
59 changes: 59 additions & 0 deletions prepare-container-focal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

set -e -u -x

SUDO=$(which sudo || true)

for i in $(seq 5); do
${SUDO} apt-get update && break
done

${SUDO} apt-get install --assume-yes --no-install-recommends \
apt-transport-https \
ca-certificates \
gnupg \
wget

cat <<EOF | ${SUDO} tee /etc/apt/sources.list.d/toolchain.list
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal main
# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal main
EOF
${SUDO} apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F

cat <<EOF | ${SUDO} tee /etc/apt/sources.list.d/emacs.list
deb http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal main
# deb-src http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal main
EOF
${SUDO} apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys 873503A090750CDAEB0754D93FF0E01EEAAFC9CD

for i in $(seq 5); do
${SUDO} apt-get update && break
done

${SUDO} ln -fs /usr/share/zoneinfo/UTC /etc/localtime
${SUDO} apt-get install --assume-yes tzdata
DEBIAN_FRONTEND=noninteractive ${SUDO} dpkg-reconfigure \
--frontend noninteractive tzdata

${SUDO} apt-get install --assume-yes --no-install-recommends \
build-essential \
bundler \
cmake cmake-data \
emacs27 \
gcc-9 g++-9 gfortran-9 \
gcc-10 g++-10 gfortran-10 \
gcc-11 g++-11 gfortran-11 \
git-core \
indent \
libblas-dev \
liblapack-dev \
libmetis-dev \
libopenmpi-dev \
make \
pkg-config \
python \
python3-numpy \
python-numpy \
sudo