-
Notifications
You must be signed in to change notification settings - Fork 10
Compatibility with Ubuntu versions #28
Description
Related to #27
There are two separate dimensions here:
- Current Chaste with older Ubuntu
- Older Chaste with older Ubuntu
Current Chaste with older Ubuntu
I think the main point here is that if someone is using the current Chaste, they should be using whichever Ubuntu base image we recommend, and so there's little value spending any resources on checking which older Ubuntu base images the current develop branch of Chaste works with.
Older Chaste with older Ubuntu
See #27, but the problem is attempting to get Chaste 2021.1 working with a 24.10 docker image.
There's no way this will work.
In principle, each release ought to work with the Ubuntu LTS immediately before it. In this case, that would be Ubuntu 20.04.
The following diff on the Dockerfile is sufficient to get Chaste configured correctly using focal as BASE
docker build -t chaste:custom --build-arg GIT_TAG=2021.1 --build-arg BASE=focal .
fcooper@nightshade:~/GitRepos/Chaste/chaste-docker$ git diff
diff --git a/Dockerfile b/Dockerfile
index d2d7b49..1f14cf4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,7 +36,8 @@ RUN apt-get update && \
wget
# 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 \
+RUN mkdir -p /etc/apt/keyrings \
+ && 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
@@ -124,10 +125,11 @@ WORKDIR ${CHASTE_DIR}
# Install TextTest for regression testing (requires pygtk)
# NOTE: chaste-codegen is installed by CMake
-RUN python -m venv --upgrade-deps "${CHASTE_BUILD_DIR}/texttest_venv" && \
+RUN python -m venv "${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 --upgrade pip setuptools && \
python -m pip install --no-cache-dir texttest
# Create Chaste src, build, output and projects foldersBut, unfortunately compilation fails due to the sympy version pulled in by Chaste codegen.
There's not much we can do to fix that, as the fix would require changes to the tagged version of Chaste 2021.1.
I will recommend to either upgrade to the latest Chaste (option A), or, use a bare base image and do things manually.
In the meantime, since it's a fairly minor change to at least get old Chaste configuring on 20.04, is this something it's worth doing @bdevans ?