-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from bdevans/oracular
Oracular
- Loading branch information
Showing
4 changed files
with
36 additions
and
41 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# docker build --target base -t chaste/base . # Alternative: build base image | ||
# docker run -it --rm -v chaste_data:/home/chaste chaste | ||
|
||
ARG BASE=jammy | ||
ARG BASE=oracular | ||
FROM ubuntu:${BASE} AS base | ||
LABEL maintainer="Ben Evans <[email protected]>" \ | ||
author.orcid="https://orcid.org/0000-0002-1734-6070" \ | ||
|
@@ -32,41 +32,33 @@ RUN apt-get update && \ | |
sudo \ | ||
wget | ||
|
||
# Add signing key to install GitHub CLI | ||
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md | ||
# Add signing key to install GitHub CLI: https://github.com/cli/cli/blob/trunk/docs/install_linux.md | ||
RUN wget -O /etc/apt/keyrings/github-cli.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/github-cli.gpg] https://cli.github.com/packages stable main" >> /etc/apt/sources.list.d/github-cli.list | ||
|
||
# Declare BASE in this build stage (the value is inherited from the global stage) | ||
# https://github.com/moby/moby/issues/34482 | ||
# Declare BASE in this build stage (the value is inherited from the global stage): https://github.com/moby/moby/issues/34482 | ||
ARG BASE | ||
# Install the Chaste repo list and key | ||
# https://chaste.github.io/docs/installguides/ubuntu-package/ | ||
# Install the Chaste repo list and key: https://chaste.github.io/docs/installguides/ubuntu-package/ | ||
RUN wget -O /usr/share/keyrings/chaste.asc https://chaste.github.io/chaste.asc \ | ||
&& echo "deb [signed-by=/usr/share/keyrings/chaste.asc] https://chaste.github.io/ubuntu ${BASE}/" >> /etc/apt/sources.list.d/chaste.list | ||
|
||
# https://github.com/Chaste/dependency-modules/wiki | ||
# https://github.com/Chaste/infrastructure-scripts/blob/main/debian-package/debian/control | ||
# https://github.com/Chaste/ubuntu/tree/main/debs | ||
# Package: chaste-dependencies | ||
# Version: 2022.04.11 | ||
# Version: 2024.10.28 | ||
# Architecture: all | ||
# Depends: cmake | scons, g++, libopenmpi-dev, petsc-dev, libhdf5-openmpi-dev, xsdcxx, libboost-serialization-dev, libboost-filesystem-dev, libboost-program-options-dev, libparmetis-dev, libmetis-dev, libxerces-c-dev, libsundials-dev, libvtk7-dev | libvtk6-dev, python3, python3-venv | ||
# Recommends: git, valgrind, libpetsc-real3.15-dbg | libpetsc-real3.14-dbg | libpetsc-real3.12-dbg, libfltk1.1, hdf5-tools, cmake-curses-gui | ||
# Suggests: libgoogle-perftools-dev, doxygen, graphviz, subversion, git-svn, gnuplot, paraview | ||
# DEPRECATED: scons will be removed in the next release | ||
# Depends: cmake, g++, git, libopenmpi-dev, petsc-dev, libhdf5-openmpi-dev, xsdcxx, libboost-serialization-dev, libboost-filesystem-dev, libboost-program-options-dev, libparmetis-dev, libmetis-dev, libxerces-c-dev, libsundials-dev, libvtk9-dev (>= 9.3.0), python3, python3-venv | ||
# Recommends: valgrind, libpetsc-real3.20-dbg|libpetsc-real3.19t64-dbg|libpetsc-real3.18-dbg|libpetsc-real3.15-dbg, hdf5-tools, cmake-curses-gui, doxygen, graphviz, gnuplot, paraview | ||
|
||
# Install dependencies with recommended, applicable suggested and other useful packages | ||
# Install dependencies with applicable recommended and other useful packages | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
chaste-dependencies \ | ||
cmake \ | ||
clang \ | ||
lldb \ | ||
gdb \ | ||
# libvtk7-dev \ # Dependency of chaste-dependencies (check 7 not 6 is installed) | ||
python3-dev \ | ||
python3-pip \ | ||
gh \ | ||
git \ | ||
valgrind \ | ||
"libpetsc-real*-dbg" \ | ||
hdf5-tools \ | ||
|
@@ -75,17 +67,11 @@ RUN apt-get update && \ | |
graphviz && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Fix libexpat1 version for jammy: https://github.com/Chaste/Chaste/issues/249 | ||
RUN apt-get update && \ | ||
apt-get install -y --allow-downgrades libexpat1=2.4.7-1 libexpat1-dev=2.4.7-1 && \ | ||
apt-mark hold libexpat1 libexpat1-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Update system to use Python3 by default | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ | ||
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 | ||
# update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 | ||
# Fix CMake warnings: https://github.com/autowarefoundation/autoware/issues/795 TODO: Check if this is still necessary with VTK9 | ||
RUN update-alternatives --install /usr/bin/vtk vtk /usr/bin/vtk7 7 | ||
# RUN update-alternatives --install /usr/bin/vtk vtk /usr/bin/vtk9 1 | ||
|
||
# Set environment variables with args to allow for changes at build time | ||
ARG USER="chaste" | ||
|
@@ -104,9 +90,10 @@ ENV USER=${USER} \ | |
CHASTE_SOURCE_DIR="${CHASTE_DIR}/src" \ | ||
CHASTE_BUILD_DIR="${CHASTE_DIR}/build" \ | ||
CHASTE_TEST_OUTPUT="${CHASTE_DIR}/output" \ | ||
PATH="${CHASTE_DIR}/scripts:${PATH}" \ | ||
TEXTTEST_HOME=/usr/local/bin/texttest | ||
PATH="${CHASTE_DIR}/scripts:${PATH}" | ||
# TEXTTEST_HOME=/usr/local/bin/texttest | ||
ENV CHASTE_PROJECTS_DIR="${CHASTE_SOURCE_DIR}/projects" \ | ||
TEXTTEST_HOME="${CHASTE_BUILD_DIR}/texttest_venv" \ | ||
PYTHONPATH="${CHASTE_BUILD_DIR}/python" | ||
|
||
# Create user and working directory for Chaste files | ||
|
@@ -119,18 +106,22 @@ COPY --chown=${USER}:${GROUP} scripts "${CHASTE_DIR}/scripts" | |
|
||
USER ${USER} | ||
WORKDIR ${CHASTE_DIR} | ||
# SHELL [ "/bin/bash", "-exo", "pipefail", "-c" ] | ||
|
||
# Install TextTest for regression testing (requires pygtk) | ||
# NOTE: chaste-codegen is installed by CMake | ||
RUN python -m pip install --no-cache-dir --upgrade pip && \ | ||
RUN python -m venv --upgrade-deps "${CHASTE_BUILD_DIR}/texttest_venv" && \ | ||
# source "${CHASTE_BUILD_DIR}/texttest_venv/bin/activate" && \ | ||
. "${CHASTE_BUILD_DIR}/texttest_venv/bin/activate" && \ | ||
# PATH=".local:${PATH}" && \ | ||
python -m pip install --no-cache-dir texttest | ||
|
||
# Create Chaste src, build, output and projects folders | ||
RUN mkdir -p "${CHASTE_SOURCE_DIR}" "${CHASTE_BUILD_DIR}" "${CHASTE_TEST_OUTPUT}" && \ | ||
ln -s "${CHASTE_PROJECTS_DIR}" projects | ||
# DEPRECATED: Transitionary symlinks for build and output directories | ||
RUN ln -s "${CHASTE_BUILD_DIR}" lib && \ | ||
ln -s "${CHASTE_TEST_OUTPUT}" testoutput | ||
# RUN ln -s "${CHASTE_BUILD_DIR}" lib && \ | ||
# ln -s "${CHASTE_TEST_OUTPUT}" testoutput | ||
|
||
# Fix git permissions issue CVE-2022-24765 | ||
RUN git config --global --add safe.directory "${CHASTE_SOURCE_DIR}" | ||
|
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
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